## Mini Terminal (S—233)

A tiny shell for docs and onboarding: real commands you define, history with ↑/↓, Tab completion and clear.

- URL: https://sundaeui.dev/components/mini-terminal
- Category: UI components · Art direction: Refined
- Access: Free (no account needed)
- Stack: React 18+, TypeScript, plain CSS; dependencies: none
- Install: `npx shadcn@latest add https://sundaeui.dev/r/mini-terminal.json`
- Tags: terminal, console, docs, cli, developer, shell

Type a command and press Enter; output prints below with a prompt. ↑ and ↓ walk history, Tab completes command names, Ctrl+L clears.
Commands are plain functions you pass in, so it can demo a CLI without a backend.

### Usage

```tsx
import { MiniTerminal } from '@/components/sundae/mini-terminal'

<MiniTerminal />
```

### Props

- `commands` (`Record<string, (args: string[]) => string>`, required): Your commands.
- `prompt` (`string`, default `'~ $'`): Prompt text.
- `welcome` (`string`): First line.
- `fill` (`'dark' | 'light'`, default `'dark'`): Surface: dark or light.

### When to use

- CLI documentation, onboarding, playful about pages.

### When not to use

- Running real shell commands on a server.

### Accessibility

- Output is a log region; the input is a labelled text field.
- Everything works from the keyboard; there are no hidden gestures.
- Reduced motion removes the movement and keeps every state change.

### Keyboard

- Enter: Run
- ↑ / ↓: History
- Tab: Complete
- Ctrl + L: Clear
