Skip to content
Premium & Brand

Terminal

Animated terminal window that types a scripted shell session.

Import

tsx
import { Terminal } from "@cooud-ui/ui";
bash
npx cooud-ui add terminal

Examples

API Reference

Generated from the component's exported types.

TerminalProps

Extends Omit<HTMLAttributes<HTMLDivElement>, "children">

Skip TerminalProps props table
PropTypeDefaultDescription
lines*
TerminalLine[]The scripted session, played from first to last.
title
stringTitle shown centered in the chrome bar (e.g. `"zsh"` or a file path).
chrome
booleantrueRender the macOS-style chrome bar (three dots + title). Defaults to `true`.
prompt
string"$"Prompt glyph rendered before each input line. Defaults to `"$"`.
typingSpeed
numberDEFAULT_TYPING_SPEEDMilliseconds per typed character. Defaults to `30`.
loop
booleanfalseRestart the script from the top after it finishes. Defaults to `false`.
loopDelay
numberDEFAULT_LOOP_DELAYMilliseconds the finished transcript rests before a loop restarts. Defaults to `2000`.
copyButton
booleantrueShow a copy button that copies the joined `input` commands (one per line, without the prompt) — the exact text a reader wants to paste into their own shell. Defaults to `true`; hidden automatically when the script has no input lines.
motionPreference
TerminalMotionPreference"respect"Whether the typing animation plays vs. honours `prefers-reduced-motion`: `"respect"` (default), `"always"` (force motion), or `"never"` (always static).