GodUI
21

Terminal

An animated terminal window that types out a scripted sequence of commands and output, with window chrome and a blinking caret.

Nothing says "developer tool" like a terminal that types itself. Terminal plays a scripted sequence — commands type out character by character with a blinking caret, output lands after a beat — inside a clean window frame. It starts when it scrolls into view, can loop, and collapses to plain text for screen readers and reduced-motion users.

zsh — godui
$ npm install @godui/components
added 1 package in 1.2s
$ npm run build
▲ Compiled successfully
✓ Ready in 240ms

Installation

pnpm dlx shadcn@latest add "https://godui.design/r/terminal.json"

Usage

tsx
 
import { Terminal } from "@/components/godui/terminal";

Drive it with a lines array. Mark commands with type: "command" so they type out; output and comment lines appear after an optional delay:

tsx
 
<Terminal
  title="bash"
  lines={[
    { text: "# deploy to production", type: "comment" },
    { text: "git push origin main", type: "command" },
    { text: "Everything up-to-date", type: "output", delay: 400 },
  ]}
/>

Tune the pacing, loop it, or strip the window chrome:

tsx
 
<Terminal lines={lines} typingSpeed={20} loop />
<Terminal lines={lines} showChrome={false} promptSymbol="›" />
<Terminal lines={lines} startOnView={false} />

Under prefers-reduced-motion, every line renders at once with no typing or caret blink, and the full transcript is always exposed to assistive tech.

Props

PropTypeDefaultDescription
linesTerminalLine[]Scripted lines. Each is { text, type?, prompt?, delay? }.
typingSpeednumber38Milliseconds per character while typing a command.
startOnViewbooleantrueStart playing only once scrolled into view.
loopbooleanfalseRestart from the top after finishing.
titlestringTitle shown in the window chrome.
showChromebooleantrueRender the traffic-light window chrome.
promptSymbolstring"$"Default prompt symbol for command lines.

TerminalLine.type is "command" \| "output" \| "comment" (default "output"). All other div props are forwarded to the root element.

On this page

Built with GodUI

Beautifully crafted motion components for modern interfaces.

Star on GitHub