zsh
$
Installation
$ pnpm dlx shadcn@latest add @synccn/terminalFirst time in this project? Connect synccn with one command.
Usage
import { Terminal } from "@/components/ui/terminal";<Terminal lines={lines} loop />API reference
Generated from the component's TypeScript types, so it always matches the code.
Terminal
Animated terminal. Lines with type "input" are typed out; "output" lines appear instantly. lines: [{ type: "input" | "output", text, tone?: "success" | "muted" }]
PropTypeDescription
- linesrequired
TerminalLine[]Commands (typed out) and output (shown at once).
- title
stringDefault
"zsh"Window title.
- speed
numberDefault
32Milliseconds per typed character.
- pause
numberDefault
450Milliseconds after each command.
- loop
booleanDefault
falseStart again after the last line.
- className
stringExtra classes for the root element.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
Helpers
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
Accessibility
From the source
Read from this component's code when the site builds, so it can't drift.
- ARIA attributes: aria-live
- Announces changes to screen readers
More display
CardSurface with header, content and footer slots.BadgeSmall status label with an optional dot.AvatarImage with initials fallback, presence dot and stacked groups.KbdKeyboard key for shortcuts and hints.SeparatorHorizontal, vertical or labelled divider.AccordionExpanding sections with smooth height animation.