ComponentsCards
Terminal Replay
A terminal window that types out commands after a prompt and prints their output line by line.
"use client";
import { TerminalReplay, type TerminalReplayLine } from "@/components/miyuki-ui/terminal-replay";
const lines: TerminalReplayLine[] = [
{ type: "command", text: "pnpm add @shirakaba/forecast" },
{ type: "output", text: "Resolved 14 packages in 820ms", tone: "muted" },
{ type: "output", text: "+ @shirakaba/forecast 2.6.1", tone: "success" },
{ type: "command", text: "forecast --resort hakuba --days 3" },
{ type: "output", text: "Day Snowfall Summit", tone: "muted" },
{ type: "output", text: "Fri 12 22 cm -11 °C" },
{ type: "output", text: "Sat 13 35 cm -14 °C" },
{ type: "output", text: "Sun 14 4 cm -8 °C" },
];
export default function TerminalReplayDemo() {
return <TerminalReplay lines={lines} prompt="~/kiso $" title="kiso" className="w-full max-w-xl" />;
}Install
npx shadcn@latest add @miyuki-ui/terminal-replayThis needs the @miyuki-ui registry in your components.json. See Using the shadcn CLI.
Props
TerminalReplay
Prop
Type
Tanzaku Card
Narrow paper strips tied to a line by short threads, each a damped pendulum that swings and twists when touched and stirs its neighbours.
Ticket Stub
A paper ticket with a perforated stub that swings open as you pull it, breaking one perforation after another, then comes away and falls, leaving the ticket marked as used.