# Terminal

Terminal window that types commands, prints their output line by line and scrolls as it fills.

```bash
npx shadcn add https://www.reelcn.dev/r/terminal.json
```

Usage:

```tsx
<Center>
  <Terminal
    lines={[
      { type: "command", text: "npx shadcn@latest add ./r/terminal.json" },
      { type: "output", text: "Created 3 files" },
    ]}
  />
</Center>
```

Use for:

- Install steps, CLI demos and deploy logs in product and tutorial videos
- Any sequence of shell commands with their output

Avoid:

- Source files or snippets without a prompt. Use `code-block`


## Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| delay? | `number` | — | Frames to wait before entering. |
| duration? | `number` | — | Enter duration in frames. Defaults to 0.6s. Some items reuse `duration` for an unrelated local timing. See that item's own prop docs. |
| exit? | `number \| boolean` | — | Exit at the end of the parent `<Sequence>`. `false` keeps it on screen, a number sets the exit length in frames. |
| motion? | `MotionPersonality` | — | Override the theme's motion personality. |
| poster? | `boolean` | — | Renders fully entered, with no exit: for a still frame or thumbnail. Defaults to `false`. |
| holdFrames? | `number` | — | Delays the start of the exit window by this many frames, for a minimum on-screen hold. Defaults to `0`. |
| lines | `TerminalLine[]` | — |  |
| title? | `string` | `"Terminal"` | Window title. |
| prompt? | `string` | `"$"` | Printed before every command. |
| cps? | `number` | `32` | Command typing speed in characters per second. |
| pause? | `number` | — | Frames the prompt waits before a command starts typing. Defaults to 0.4s. |
| outputDelay? | `number` | — | Frames between pressing enter and the first output line. Defaults to 0.3s. |
| outputStagger? | `number` | — | Frames between output lines. |
| highlight? | `boolean` | `true` | Color commands with the bash tokenizer. |
| rows? | `number` | — | Visible rows; older lines scroll out the top. Defaults to every line, capped to fit the safe area. |
| fontSize? | `number` | `28` | Largest font size in design units. It shrinks so the longest line fits. |
| width? | `number` | — | Window width as a fraction of the safe area (0–1). Defaults to 0.62 in landscape, 1 otherwise. |
| background? | `string` | — | Terminal background. Defaults to a shade between the theme surface and background. |
| borderColor? | `string` | — |  |
| promptColor? | `string` | — | Prompt color. Defaults to the theme accent. |
| outputColor? | `string` | — | Output text color. Defaults to a softened foreground. |
| radius? | `number` | — | Corner radius in design units. Defaults to 60% of the theme radius. |
| follow? | `CaretFollow` | — | Zooms the camera to trail the caret as it types. Omitted (default): today's behavior, unchanged. |
| style? | `CSSProperties` | — |  |
| className? | `string` | — |  |