Tapas UI
Esc
  • IntroductionGetting startedWhat Tapas UI is and where to start.
  • InstallationGetting startedSet up shadcn/ui and add your first section.
  • CLI & AI agentsGetting startedThe shadcn CLI, the @tapas namespace, the MCP server and AI prompts.
  • TemplatesGetting startedWhole pages built from sections, installed with one command.
  • Demo sitesGetting startedThree fictional sites built only from Tapas sections.
  • ThemingCustomizationHow sections pick up your colors and radius.
  • ColorsCustomizationEvery CSS variable sections read, what it is for and where it is used.
  • Dark modeCustomizationSections follow your .dark variables.
  • MotionCustomizationPlain and motion versions, reduced motion and pause controls.
  • AccessibilityCustomizationWhat every section guarantees.
  • Waitlist formsGuidesPost signups to your own API route and store them.
  • Checkout linksGuidesPoint pricing buttons at Stripe payment links or any URL.
Menu
Browse the docs

DocsProduct story

Terminal demo

A terminal window with a transcript of commands and their output.

Preview

Version
Preview theme color
More themes

Commands are typed and output prints line by line once the window scrolls into view. Pause and replay buttons sit in the title bar. The whole transcript is in the page from the start, so screen readers and copy get all of it and the window never changes height. With reduced motion turned on, it renders the plain layout.

npx shadcn@latest add https://example.com/r/hero.json
✔ Checking registry.
✔ Created 1 file:
  - components/custom/hero/hero.tsx
pnpm dev
▲ Ready on http://localhost:3000 (sample output)
npx shadcn@latest add https://example.com/r/hero.json
✔ Checking registry.
✔ Created 1 file:
  - components/custom/hero/hero.tsx
pnpm dev
▲ Ready on http://localhost:3000 (sample output)

Installation

Run this in a project that already uses shadcn/ui. It adds the component and anything it needs; the motion version also adds the plain one and the motion package.

Usage

import { TerminalDemo } from "@/components/custom/terminal-demo";

<TerminalDemo
  label="zsh"
  lines={[
    { kind: "command", text: "npx shadcn@latest add https://example.com/r/hero.json" },
    { kind: "output", text: "✔ Created 1 file." },
  ]}
/>
import { TerminalDemoMotion } from "@/components/custom/terminal-demo/terminal-demo-motion";

<TerminalDemoMotion lines={lines} />

Props

PropTypeDefaultDescription
lines* (required){ kind: "command" | "output"; text: string }[]–The transcript, in order.
labelstring"Terminal"Window title; also the terminal's accessible name.
promptstring"$"Shown before each command. Not read aloud and not included when copying.
...propsReact.ComponentProps<"div">–Any other div attribute (id, aria-*, data-*, ref) goes to the root element.
PropTypeDefaultDescription
lines* (required){ kind: "command" | "output"; text: string }[]–The transcript, in order.
labelstring"Terminal"Window title; also the terminal's accessible name.
promptstring"$"Shown before each command. Not read aloud and not included when copying.
...propsReact.ComponentProps<"div">–Any other div attribute (id, aria-*, data-*, ref) goes to the root element.

Accessibility

  • The transcript is real text in a pre element: selectable, copyable and read in order.
  • The prompt and window dots are decorative and hidden from screen readers.
  • The motion version follows the visitor's reduced-motion setting and never hides content before it animates.