VCOS UIVCOS UI
Components

Terminal

Minimal workflow terminal with line-numbered code reveal and optional auto-cycling steps.

Preview

Component

Workflow Terminal

Minimal code-window terminal with line numbers, staggered character reveal, and optional automatic step cycling.

workflow.ts
1pnpm install
2pnpm lint
3pnpm types:check

Usage

import { Terminal, type TerminalStep } from "@/components/ui/terminal";

const steps = [
  {
    code: `pnpm install
pnpm lint
pnpm types:check`,
  },
  {
    code: `export function buildWorkflow() {
  replaceTerminal();
  return "ready";
}`,
  },
] satisfies ReadonlyArray<TerminalStep>;

<Terminal steps={steps} />

Props

Terminal

PropTypeDefaultDescription
stepsReadonlyArray<{ code: string }>RequiredStep list that drives the displayed code block.
activeStepnumberControlled step index. When omitted, the component manages the current step itself.
autoPlaybooleantrueAutomatically cycles through the provided steps when activeStep is not controlled.
intervalnumber2200Milliseconds between step changes in auto-play mode.
classNamestringCSS classes on the outer container

On this page