WebberUI

Animated Terminal

A command-line terminal that simulates typing line by line, with per-character command entry, output reveals, and looping playback.

A terminal with a macOS window look that "types" each line out in order: command lines are entered character by character behind a prompt, output and comment lines are revealed in rhythm, and a blinking idle cursor is left at the end.

Loading preview…
npx shadcn@latest add https://webberui.com/r/animated-terminal.json

Playground

Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.

45
500
<AnimatedTerminal />

Installation

npx shadcn@latest add https://webberui.com/r/animated-terminal.json

Or, once registries are configured in components.json, install it as @webberui/animated-terminal.

Usage

import { AnimatedTerminal } from "@/components/ui/animated-terminal";

<AnimatedTerminal
  title="webberui — zsh"
  lines={[
    { type: "command", text: "npm run build" },
    { type: "output", text: "Build complete in 4.2s", delay: 800 },
  ]}
/>;

Each entry in lines has a type of "command", "output", or "comment"; only command is typed out character by character and shows a prompt, while output and comment are revealed a whole line at a time. Use delay to add a pause before a given line starts, simulating a compile or a wait.

Props

PropTypeDefaultDescription
linesTerminalLine[]The lines to play, in order
typingSpeednumber45Per-character typing speed for command (milliseconds per character)
lineDelaynumber500Pause after each line finishes, before the next one starts (milliseconds)
startDelaynumber300Delay before the whole thing starts (milliseconds)
promptstring"$"Default prompt
titlestring"bash"Text in the window title bar
showTrafficLightsbooleantrueShow the three macOS red/yellow/green lights
loopbooleanfalseReplay from the start once finished
loopDelaynumber2200Pause before looping (milliseconds)

TerminalLine

FieldTypeDefaultDescription
type"command" | "output" | "comment""command"Line type
textstringThe line's text content
promptstringinherits promptOverride the prompt for this line (only applies to command)
delaynumber0Extra pause before this line starts (milliseconds)

Accessibility

  • When the user has "reduce motion" enabled at the system level, every line is rendered complete right away and the cursor does not blink
  • The three window lights and the cursor all carry aria-hidden, so they do not interfere with screen readers

On this page