Terminal
Displays commands and output with copy support and switchable variants.
@rivetui/terminalPreview
Explore each composition interactively, then open its code in the same context.
Default
Offer equivalent commands as typed variants when a workflow supports multiple package managers.
Note
The selected command variant is shared with other Terminal instances that use the same values.
Install package
bun add lucide-react --exactCommand forms
Use one command for a direct action or preserve line breaks for a short sequence.
Repository
git status --shortRelease pipeline
bun install
bun run check
bun run buildOutput
Disable the prompt and copy action when the surface represents output rather than input.
Build result
✓ Compiled successfully
✓ Generated 28 static pages
Done in 2.84sRegistry
Installation
Add the component source and its declared dependencies with the shadcn CLI.
Install component
bunx --bun shadcn@latest add @rivetui/terminalPublic interface
API reference
Component-specific props are listed here. Native element and Base UI props continue to pass through.
| Prop | Type | Default |
|---|---|---|
command | string | — |
commands | readonly TerminalCommand[] | — |
defaultValue | TCommands[number]["value"] | string | first command |
value | TCommands[number]["value"] | string | — |
onValueChange | (value: string) => void | — |
label | ReactNode | "Terminal" |
prompt | ReactNode | false | "$" |
language | string | "shell" |
copyable | boolean | true |