Terminal
<Terminal>TailwindCSS ModulesVisual terminal sessions for docs and marketing — prompts, commands, output, status, and a blinking cursor. Display-only; never executes shell commands.
npx coloxo add terminal --style coloxo-cssimport { Terminal } from '@coloxo/ui';Design Tokens:
1. Install & usage
Copy the commands below. The Terminal copy button copies commands only — never prompts or chrome.
Package + CLI
pnpm add @coloxo/uinpx coloxo add terminal
npm / pnpm / yarn
npm install @coloxo/uinpx coloxo add terminal
pnpm add @coloxo/uipnpm dlx coloxo add terminal
yarn add @coloxo/uiyarn dlx coloxo add terminal
Import
import { Terminal } from "@coloxo/ui";2. Variant matrix
Chrome levels from full window to inline command snippets.
| Variant | Preview |
|---|---|
| default | bash npx coloxo add button |
| minimal | npx coloxo add button |
| window | bash npx coloxo add button |
| inline | npx coloxo add button |
3. Features
Structured commands, status output, shells, and paths — without becoming a real shell.
Dev session
~/projects/coloxopnpm installPackages: +42pnpm devLocal: http://localhost:3000Ready in 1.2s
Status output
npm run buildBuild completed successfully.npm run test3 tests failed.npm audit1 moderate vulnerability
Shells
ls -lals -lapnpm add @coloxo/uiCommand-only (docs install)
npx coloxo add button4. Interactive props configurator
Working directory
Copy button
Cursor
Cursor blink
~/projects/coloxopnpm add @coloxo/uinpx coloxo add terminal
<Terminal shell="bash" cwd="~/projects/coloxo" showCopyButton commands={[ { command: "pnpm add @coloxo/ui" }, { command: "npx coloxo add terminal" }, ]}/>5. Themes
Dark by default. Force light, or follow the app with theme="system".
npx coloxo add terminalnpx coloxo add terminal~/projects/coloxopnpm installPackages: +42pnpm devLocal: http://localhost:3000Ready in 1.2s
6. Accessibility
Native button with aria-label. Status announced via aria-live polite region.
Only command text is copied — prompts, dots, and cursor are excluded.
Cursor blink respects prefers-reduced-motion.
Code is selectable by default; disable with selectable={false}.
7. Props
| Name | Type | Default | Description |
|---|---|---|---|
| commands | TerminalCommand[] | — | Structured session: { command, output?, status? }. |
| content | string | — | Raw terminal body when not using commands. |
| shell | "bash" | "zsh" | "powershell" | "cmd" | "fish" | "sh" | "terminal" | bash | Shell identity for prompt defaults and header label. |
| shellLabel | string | — | Override header shell label. |
| title | string | — | Optional header title. |
| cwd | string | — | Working directory line (or baked into PowerShell/cmd prompt). |
| variant | "default" | "minimal" | "window" | "inline" | default | Chrome level. |
| theme | "light" | "dark" | "system" | dark | Forced or system theme (dark default). |
| showWindowControls | boolean | true | Traffic-light dots. |
| showShell | boolean | true | Shell label in header. |
| showPrompt | boolean | true | Prompt before each command. |
| prompt | string | — | Override prompt string. |
| showCursor | boolean | true | Trailing idle cursor. |
| cursor | "block" | "line" | "underline" | block | Cursor shape. |
| cursorBlink | boolean | true | Animate cursor (honors reduced motion). |
| showCopyButton | boolean | false | Copy commands only (no prompts). |
| maxHeight | number | string | — | Scrollable body height. |
| scrollable | boolean | true | Allow body scrolling. |
| selectable | boolean | true | Allow text selection. |
| padding | "sm" | "md" | "lg" | md | Body padding. |
| fontSize | "sm" | "md" | "lg" | md | Monospace size. |