Skip to main content

TerminalTranscriptRow

Transcriptterminal

One line of an agent transcript on top of TerminalRow: a closed kind axis (user/agent/output/error) that carries who spoke and whether it failed as a glyph, a colour and an accessible label.

import { TerminalTranscriptRow } from "@elabs-ai/components-terminal";
Install
npm install @elabs-ai/components-tokens @elabs-ai/components-ui @elabs-ai/components-terminal

Skipping the @source line is the most common first failure: Tailwind does not scan node_modules, so every component renders unstyled. The one-time wiring

Prompt for your coding agent

Paste it into Claude Code, Cursor, Codex or any other coding agent. Text in [brackets] is yours to fill in.

Add the brand-ui TerminalTranscriptRow component (from @elabs-ai/components-terminal) to this project.

1. Read https://elabs-ai.com/llms.txt first: it maps every package and the rules. If you can use MCP servers, connect https://elabs-ai.com/mcp and use its search, docs and tokens tools. If not, run the same lookups in the terminal: `npx -y @elabs-ai/components-cli search "<what you need>"` and `npx -y @elabs-ai/components-cli docs <Component>`.
2. Look TerminalTranscriptRow up before writing code: `npx -y @elabs-ai/components-cli docs TerminalTranscriptRow` prints its real props, variants, what it pairs with and what to avoid.
3. If @elabs-ai/components-terminal is not installed yet: `pnpm add @elabs-ai/components-tokens @elabs-ai/components-ui @elabs-ai/components-terminal` (or `npm install @elabs-ai/components-tokens @elabs-ai/components-ui @elabs-ai/components-terminal`). If this is the first brand-ui package in the project, wire it once: import `@elabs-ai/components-tokens/styles.css` plus the `themes/light.css` and `themes/dark.css` stylesheets in the CSS entry, add one Tailwind `@source` line per installed @elabs-ai package (Tailwind does not scan node_modules, so without it everything renders unstyled), and wrap the app root in `ThemeProvider` from `@elabs-ai/components-tokens`.
4. Use it here: [the screen or file, and what it should show]
5. Rules: use only @elabs-ai/components-* components and the semantic tokens — no raw colours, no raw font sizes, no arbitrary Tailwind values. Look up each component's real props with the docs tool before you use it; never guess a prop.
6. Done means: the typecheck passes, `npx -y @elabs-ai/components-cli audit src --strict` reports nothing, and you have opened the app and looked at every screen you touched in the light and the dark theme.

Avoid

  • Rendering `kind="error"` while a turn is still streaming — errors are for settled, terminal failures only (`.claude/rules/conventions.md`, Loading & streaming states).
  • Relying on colour alone to distinguish `error` — the glyph and the `gutterLabel` word are the load-bearing channels; colour is redundant.
  • Reaching for a vendor mode/effort union on `kind` — the axis is closed to `user`/`agent`/`output`/`error`, nothing else (#117 acceptance criterion).
  • Formatting `exitCode` yourself into a string — pass the number and let the component render the affordance.

Works with

Pairs with

Avoid next to

  • a second row claiming the same settled turn's error

Examples

7 live examples

User

What the human typed — a prompt glyph in the gutter.

Agent

What the agent said — the status-marker glyph.

Output

Plain program output — the continuation-branch glyph, dimmer ink.

Error State

A settled, terminal failure. Readable in greyscale: a distinct glyph plus the "Error" label carry the meaning even with `text-terminal-ansi-red` turned off.

Transcript

A full transcript, reading top to bottom as one session.

Long Content

Long output wraps under the content column rather than truncating.

API

TerminalTranscriptRow

kind
user (default)agentoutputerror
PropTypeDescription
exitCodenumberThe process exit code for a settled `output`/`error` line. Modelled as data — the component formats the affordance ("exit 1") — never a caller-formatted string. Ignored on `user`/`agent` kinds, which have no exit status of their own.
variantTerminalVariantGutter grammar. Omitted, the row inherits the surrounding `TerminalSurface`; passed, it overrides it, so a row still renders correctly outside any surface.
childrenReactNode

Also accepts: Omit<TerminalRowProps, "gutter" | "gutterLabel">, VariantProps<typeof terminalTranscriptRowVariants>

Theming

The tokens each state resolves to. Change the token and every theme follows.

StateToken
outputtext-terminal-muted
errortext-terminal-ansi-red