SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

TypedTerminal

An animated terminal that proves "you write this, it does that".

Open in a new tab
View code
tsx
<TypedTerminal
	aria-label="A sign-in spec and its run"
	pauseLabel="Pause the animation"
	title="specs/sign-in.spec"
	lines={[
		{ kind: "input", text: 'visit "/login"' },
		{ kind: "input", text: 'fill "Email" with "ada@example.com"' },
		{ kind: "input", text: 'click "Sign in"' },
		{ kind: "input", text: 'see "Welcome back, Ada"' },
		{ kind: "output", text: "✓ 4 steps · 2.1s", status: "ok" },
	]}
/>

Demo landings

Whole pages built only from @sdxc/ui, each for an invented product with its own palette and type. They open in a new tab.

Every demo, landings and docs sites alike, is listed in the demo gallery.

Installation

An ordinary dependency: install it, import the theme once, and import the component where it is used.

Terminal
npm add @sdxc/ui remix
typescript
import "@sdxc/ui/theme.css";

Usage

typescript
import { TypedTerminal } from "@sdxc/ui/landing";

Renders the session as one <pre> in the terminal panel, with its pause toggle in the panel's title bar, centred against the title. Every line's full text is in the markup from the start, clipped only visually while it types, so screen readers and copy read the whole session and reduced motion shows it done.

Props

Read from the component's own types, so every prop, every default and every allowed value is listed.

PropTypeRequiredDescription
"aria-label"stringYesAccessible name of the session's figure. Required — the library ships no copy.
pauseLabelstringNoAccessible name of the pause toggle.
titleRemixNodeNoWindow title, such as a file name or a shell.
promptstringNoGlyph before every input line, such as $; omit it for editor-style lines.
linesreadonly Line[]YesThe session, in the order it plays.

Also accepts everything in Omit<TagProps<"div">, "children" | "title">.

Types

NameValuesWhat it decides
Status"ok" | "fail" | "muted"Ink an output line prints in: a pass, a failure, or a quiet aside.
@sdxc/ui

Can’t find it? Contact us