Skip to content
synccn

Terminal

Animated terminal that types commands and prints output.

zsh
$

Installation

$ pnpm dlx shadcn@latest add @synccn/terminal

First 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" }]

  • linesrequired
    TerminalLine[]

    Commands (typed out) and output (shown at once).

  • title
    string

    Default "zsh"

    Window title.

  • speed
    number

    Default 32

    Milliseconds per typed character.

  • pause
    number

    Default 450

    Milliseconds after each command.

  • loop
    boolean

    Default false

    Start again after the last line.

  • className
    string

    Extra 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

npm packages

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