Terminal
ProA terminal window that types commands and prints output when scrolled into view.
Installation
pnpm dlx shadcn@latest add @viewport/terminal
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| lines* | TerminalLine[] | — |
| title | string | "zsh" |
| typingSpeed | numberMilliseconds per typed character. | 32 |
| lineDelay | numberMilliseconds between lines. | 420 |
| loop | booleanReplay from the start after finishing. | false |
| className | string | — |
Accessibility
- Exposed as an image whose label lists the commands.
- Prints everything at once under reduced motion.
- Scrolls horizontally instead of wrapping on small screens.