A terminal window with command, output, success, error and comment lines, optional per-command copy buttons and a sequenced typing animation that respects reduced motion.
The source is part of Ballmac UI Pro.
Log in with your licence key to read and copy it here, or install it through the shadcn CLI or the MCP server. You own the code once it is in your project.
$49 once regular price $99for this and every other Pro item. Tax included.Money back if it does not work.
Installation
Get a Pro licence key.
The source is part of Ballmac UI Pro.
Log in with your licence key to read and copy it here, or install it through the shadcn CLI or the MCP server. You own the code once it is in your project.
$49 once
regular price $99for this and every other Pro item. Tax included.Money back if it does not work.Once per project: add the Pro registry and your licence key.
components.json{ "registries": { "@ballmac": "https://ui.ballmac.com/r/{name}.json", "@ballmac-pro": { "url": "https://ui.ballmac.com/r/pro/{name}.json", "headers": { "Authorization": "Bearer ${BALLMAC_LICENSE_KEY}" } } } }.env.localBALLMAC_LICENSE_KEY=your-licence-keyAdd it.
$ pnpm dlx shadcn@latest add @ballmac-pro/terminal
Usage
import { Terminal, TerminalLine, TerminalAnimated } from "@/components/ballmac/terminal"The full example is in the Code tab above.
Examples
Typing animation
The source is part of Ballmac UI Pro.
Log in with your licence key to read and copy it here, or install it through the shadcn CLI or the MCP server. You own the code once it is in your project.
$49 once regular price $99for this and every other Pro item. Tax included.Money back if it does not work.
API reference
<Terminal>
| Prop | Type | Default |
|---|---|---|
titleText in the title bar, e.g. "zsh" or "~/my-app". | string | — |
theme"dark" scopes the theme's dark tokens to the window in light mode too; "inherit" follows the page. | "dark" | "inherit" | "dark" |
bodyClassNameClasses for the scrolling body. | string | — |
<TerminalAnimated>
| Prop | Type | Default |
|---|---|---|
speedTyping speed for command lines, in characters per second. | number | 36 |
lineDelayPause before each non-command line appears, in milliseconds. | number | 140 |
startDelayWait before the first line starts, in milliseconds. | number | 300 |
startOnViewStart only once the terminal scrolls into view. | boolean | true |
onCompleteCalled when every line has been revealed. | () => void | — |
<TerminalLine>
| Prop | Type | Default |
|---|---|---|
promptPrompt shown before command lines. | string | "$" |
copyableShow a copy button for command lines (copies the text without the prompt). | boolean | false |
typingType the command out character by character (string children only). Implied inside TerminalAnimated. | boolean | — |
speedCharacters per second when typing outside TerminalAnimated. | number | — |
variant | "command" | "output" | "success" | "error" | "comment" | "output" |
Also accepts the standard attributes of its root element.
Accessibility
| Key | Action |
|---|---|
| Tab | Focuses the copy button on command lines (hidden until hover on mouse devices, visible on focus) |
| — | The prompt symbol is hidden from screen readers; success and error lines carry a text prefix, not just color; aria-busy is set while animating |
Quality scorecard
Every applicable check passes
Measured in Chromium 153.0.8010.12 on October 19, 2026, on version 1.0.0, across 2 examples.
Passed: Accessibility scan
No serious or critical issues in light and dark, on a phone and a desktop (axe-core 4.13.0, WCAG 2.1 AA and best-practice rules).
Passed: Small screens
No sideways scrolling at 360, 390 or 1280 px wide.
Passed: Reduced motion
Every endless animation stops when the visitor asks for less motion.
Not applicable: Right to left
Not mirrored by design: Terminals are left-to-right inside by design.
Passed: Clean console
No console errors or React hydration errors while loading.
Passed: Keyboard
3 tab stops, each showing a visible change when it takes focus. 2 documented keys.
Not applicable: Loading, empty and error
Does not show data or take submissions.
For information: Automated tests
No test file of its own yet.
For information: Footprint
3.6 KB of source (gzip) in 1 file. Installs class-variance-authority, lucide-react, motion.
Automated checks find a subset of problems and do not replace testing with a screen reader and a keyboard in your own app. What they miss.
Use with AI
Show CLI sessions: <Terminal title> with <TerminalLine variant='command' copyable> and output lines. Wrap lines in <TerminalAnimated> to type commands out and reveal output in order when scrolled into view. With the shadcn MCP server set up (guide), ask your agent:
Add the Ballmac UI Terminal (@ballmac-pro/terminal) to this project with the shadcn MCP, then use it where it fits.
Use it for
- Install and setup steps on landing pages and docs
- Showing what a CLI prints, including success and error lines
- An animated hero that types a command and its result
Not for
- Copyable install commands for several package managers (use install-tabs)
- Source code files (use code-block)
- A real interactive shell (this renders static or scripted lines only)
Registry JSON (needs your licence key): https://ui.ballmac.com/r/pro/terminal.json
Credits
Covered by the Ballmac UI Pro license.
- Registry
- @ballmac/i18nshadcn/utils
Pairs well with
Install Tabs
Package-manager tabs for a CLI command (pnpm, npm, yarn, bun) with a copy button. Remembers the reader's choice and keeps every instance on the page in sync.
Code Block
A code panel with filename and language header, line numbers, highlighted lines, a wrap toggle, copy feedback and file tabs. No highlighter bundled; pass Shiki output as children.
API Key Field
Displays a secret such as an API key, masked by default (sk-live-••••••••a1b2), with a reveal toggle, a copy button that copies the full key, and an optional regenerate action.
Copy Button
A copy-to-clipboard button with a morphing check icon, an optional label, a fallback for blocked clipboards, an error state and a polite announcement.