Terminal

<Terminal>TailwindCSS Modules

Visual terminal sessions for docs and marketing — prompts, commands, output, status, and a blinking cursor. Display-only; never executes shell commands.

InstallationColoxo CLI
npx coloxo add terminal --style coloxo-css
ES Module ImportPlayground / npm package
import { Terminal } from '@coloxo/ui';

Design Tokens:

--cx-terminal-bg--cx-terminal-prompt--cx-terminal-success--cx-radius-lg: 12px

1. Install & usage

Copy the commands below. The Terminal copy button copies commands only — never prompts or chrome.

Package + CLI

bash
pnpm add @coloxo/uinpx coloxo add terminal

npm / pnpm / yarn

npm
bash
npm install @coloxo/uinpx coloxo add terminal
pnpm
bash
pnpm add @coloxo/uipnpm dlx coloxo add terminal
yarn
bash
yarn add @coloxo/uiyarn dlx coloxo add terminal

Import

TypeScript
import { Terminal } from "@coloxo/ui";

2. Variant matrix

Chrome levels from full window to inline command snippets.

VariantPreview
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

zsh
~/projects/coloxopnpm installPackages: +42pnpm devLocal:   http://localhost:3000Ready in 1.2s

Status output

bash
npm run buildBuild completed successfully.npm run test3 tests failed.npm audit1 moderate vulnerability

Shells

bash
ls -la
zsh
ls -la
PowerShell
pnpm add @coloxo/ui

Command-only (docs install)

bash
npx coloxo add button

4. Interactive props configurator

Working directory

Copy button

Cursor

Cursor blink

Visual Render CanvasSHELL: BASH | VARIANT: DEFAULT | STATUS: DEFAULT
bash
~/projects/coloxopnpm add @coloxo/uinpx coloxo add terminal
tsx
<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".

bash
npx coloxo add terminal
bash
npx coloxo add terminal
zsh
~/projects/coloxopnpm installPackages: +42pnpm devLocal:   http://localhost:3000Ready in 1.2s

6. Accessibility

Copy

Native button with aria-label. Status announced via aria-live polite region.

Clipboard payload

Only command text is copied — prompts, dots, and cursor are excluded.

Motion

Cursor blink respects prefers-reduced-motion.

Selection

Code is selectable by default; disable with selectable={false}.

7. Props

NameTypeDefaultDescription
commandsTerminalCommand[]—Structured session: { command, output?, status? }.
contentstring—Raw terminal body when not using commands.
shell"bash" | "zsh" | "powershell" | "cmd" | "fish" | "sh" | "terminal"bashShell identity for prompt defaults and header label.
shellLabelstring—Override header shell label.
titlestring—Optional header title.
cwdstring—Working directory line (or baked into PowerShell/cmd prompt).
variant"default" | "minimal" | "window" | "inline"defaultChrome level.
theme"light" | "dark" | "system"darkForced or system theme (dark default).
showWindowControlsbooleantrueTraffic-light dots.
showShellbooleantrueShell label in header.
showPromptbooleantruePrompt before each command.
promptstring—Override prompt string.
showCursorbooleantrueTrailing idle cursor.
cursor"block" | "line" | "underline"blockCursor shape.
cursorBlinkbooleantrueAnimate cursor (honors reduced motion).
showCopyButtonbooleanfalseCopy commands only (no prompts).
maxHeightnumber | string—Scrollable body height.
scrollablebooleantrueAllow body scrolling.
selectablebooleantrueAllow text selection.
padding"sm" | "md" | "lg"mdBody padding.
fontSize"sm" | "md" | "lg"mdMonospace size.