Skip to main content

TerminalBanner

Surfacesterminal

The console-dress launch card above an empty transcript: identity (name, model, version, workspace), capabilities, what's new and quick actions with key hints — every section independently optional.

import { TerminalBanner } 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 TerminalBanner 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 TerminalBanner up before writing code: `npx -y @elabs-ai/components-cli docs TerminalBanner` 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

  • Using `<fieldset>`/`<legend>` to sit the title in the border — that misreports a decorative heading as a form-control group to assistive tech; it renders a real Heading beside a real border instead.
  • Rendering a vendor bitmap logo — the component ships no mark of its own; `logo` is a caller-supplied `ReactNode` slot, never a baked-in wordmark (#117 acceptance criterion).
  • Truncating `workspace` to one line — long paths WRAP so the full value stays reachable, matching the family's wrap-over-truncate fidelity axis rather than SessionHeader's single-line truncation.
  • Importing `SessionHeader` or anything from `@elabs-ai/components-ai` — `terminal` and `ai` are layer-2 DAG siblings; the shared vocabulary (`SessionCapability`/`SessionWhatsNewItem`/`SessionQuickAction`) lives in `@elabs-ai/components-ui` instead.

Works with

Examples

6 live examples

Full Anatomy

Every section filled in — the full anatomy this component supports.

Long Workspace Path

A long workspace path wraps under the content column instead of truncating.

Boxed Variant

The `boxed` variant — a framed block per row, reads as frame-drawing output.

Rail Variant

The `rail` variant — a vertical rule down the gutter, glyphs suppressed.

Above A Transcript

Sits above the transcript exactly where it lives in practice.

API

TerminalBanner

PropTypeDescription
titlestringSession/agent name. Anchors the card — every other section is independently optional and renders nothing when omitted.
modelstringActive model, e.g. "gpt-5.1-codex".
workspacestringWorking directory / project path. Wraps instead of truncating (see above).
versionstringBuild/version string, e.g. "v2.4.0".
capabilitiesSessionCapability[]What this session can reach.
whatsNewSessionWhatsNewItem[]Recent changes, shown as a short list.
quickActionsSessionQuickAction[]Shortcut actions, rendered as real menu-row buttons with optional key hints.
logoReactNodeA caller-supplied mark, rendered beside `title`. This package ships no vendor logo of its own — bring your own `ReactNode`, or omit it.
variantTerminalVariantGutter grammar for the banner's internal rows. Omitted, they inherit the surrounding `TerminalSurface`; passed, it overrides it for this banner — the same override contract `TerminalRow` itself exposes.
levelHeadingLevelSemantic heading level for `title`. Default `2` (a banner typically sits above a transcript inside a page that already owns its own `<h1>`).

Also accepts: ComponentProps<"div">

TerminalRow

variant
marker (default)railboxed
PropTypeDescription
variantTerminalVariantGutter grammar. Omitted, the row inherits the surrounding `TerminalSurface`; passed, it overrides it, so a row still renders correctly outside any surface.
gutterReactNodeWhat sits in the gutter cell — usually one glyph. Decorative by default.
gutterLabelstringThe meaning the gutter glyph carries, as words. Set it whenever the glyph is not purely ornamental; it is announced and it survives greyscale.
childrenReactNode

Also accepts: Omit<HTMLAttributes<HTMLDivElement>, "children">, Omit<VariantProps<typeof terminalRowVariants>, "variant">

Theming

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

StateToken
quickActionhover:bg-terminal-selection hover:text-terminal-foreground
whatsNewLinktext-terminal-ansi-bright-cyan