import { SessionHeader } from "@elabs-ai/components-ai";npm install @elabs-ai/components-tokens @elabs-ai/components-ui @elabs-ai/components-aiPaste it into Claude Code, Cursor, Codex or any other coding agent. Text in [brackets] is yours to fill in.
Add the brand-ui SessionHeader component (from @elabs-ai/components-ai) 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 SessionHeader up before writing code: `npx -y @elabs-ai/components-cli docs SessionHeader` prints its real props, variants, what it pairs with and what to avoid. 3. If @elabs-ai/components-ai is not installed yet: `pnpm add @elabs-ai/components-tokens @elabs-ai/components-ui @elabs-ai/components-ai` (or `npm install @elabs-ai/components-tokens @elabs-ai/components-ui @elabs-ai/components-ai`). 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
- Leaving it mounted once the conversation starts — it is the empty-session surface, not persistent chrome.
- Using it as the app header — ChatShell's header slot is a fixed-height bar; this is a block in the transcript.
- Listing a capability the app cannot actually perform — the list is a promise the session has to keep.
Works with
Used inside
Pairs with
Examples
Title Only
`title` is the only prop supplied — every other section (meta, workspace, capabilities, what's new, quick actions) is absent. Renders the identity row alone with no empty scaffolding and no stray separators.
Fully Populated
Every section populated — the full launch-card anatomy.
Long Workspace Path
A long workspace path truncates instead of overflowing its container.
Heading Level 3
A route that already owns the page's `<h1>` — pass `level={3}` to keep a single, hierarchical outline.
With Chat Greeting
SessionHeader above ChatGreeting — the standard empty first-run agent session.
Focus Indicator
Focus indicator on whats-new link (#313): Tab to the link and assert the compound indicator's OUTLINE layer (`outlineStyle: "solid"`, `--ring-contour`) that `focus-ring` adds. `boxShadow !== "none"` alone also passes on the legacy `focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2` pattern (Tailwind's `ring-2` still paints a box-shadow), so it does not lock the fix.
API
SessionHeader
| Prop | Type | Description |
|---|---|---|
title | string | Session/agent name, e.g. "Codex". Anchors the card — every other section is independently optional and renders nothing when omitted. |
model | string | Active model, e.g. "gpt-5.1-codex". |
workspace | string | Working directory / project path. Truncates instead of overflowing. |
version | string | Build/version string, e.g. "v2.4.0". |
capabilities | SessionCapability[] | What this session can reach. |
whatsNew | SessionWhatsNewItem[] | Recent changes, shown as a short list. |
quickActions | SessionQuickAction[] | Shortcut actions, rendered as real buttons with optional shortcut hints. |
level | HeadingLevel | Semantic heading level for `title`. Default `2` (a session header typically sits above a `ChatGreeting`'s level-1 headline, or inside a page that already owns its own `<h1>`). |
Theming
The tokens each state resolves to. Change the token and every theme follows.
| State | Token |
|---|---|
| surface | bg-card text-card-foreground — a raised card above the canvas |
| link | text-link for what's-new links, underlined on hover |
| focus | ring-2 ring-ring ring-offset-2 ring-offset-background on quick actions |