import { AppIcon } from "@elabs-ai/components-icons";npm install @elabs-ai/components-tokens @elabs-ai/components-ui @elabs-ai/components-iconsPaste it into Claude Code, Cursor, Codex or any other coding agent. Text in [brackets] is yours to fill in.
Add the brand-ui AppIcon component (from @elabs-ai/components-icons) 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 AppIcon up before writing code: `npx -y @elabs-ai/components-cli docs AppIcon` prints its real props, variants, what it pairs with and what to avoid. 3. If @elabs-ai/components-icons is not installed yet: `pnpm add @elabs-ai/components-tokens @elabs-ai/components-ui @elabs-ai/components-icons` (or `npm install @elabs-ai/components-tokens @elabs-ai/components-ui @elabs-ai/components-icons`). 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
- Hand-rolling BrandLogo plus a lucide box in app chrome — AppIcon is the standard app mark.
- Using AppIcon as a brand-neutral scaffold placeholder or a multi-tenant team switcher — it is the product's own mark.
AppIcon — the standard product/brand mark for app chrome. Built on BrandLogo, so it's theme-correct automatically (each theme's approved colorway). In morph="auto" it shows the full lockup — the hatched-circle glyph plus title as the wordmark — and collapses to the glyph alone when its enclosing Sidebar collapses to the icon rail, a width + crossfade morph. Use it everywhere an app icon appears; pass your own title to get your own lockup. The morph keys off the Sidebar's group-data-[collapsible=icon] signal.
Works with
Contains
Used inside
Examples
Collapse Morph
The collapse morph — toggle to watch the lockup morph to the glyph, exactly as it does when a `Sidebar` collapses. (The `.group` + `data-collapsible` wrapper stands in for the real `Sidebar` here.)
Endpoints
Both resting endpoints of the morph, side by side.
Lockup
Forced full lockup (no morph).
Mark
Forced glyph-only mark (no morph).
Sizes
Scales proportionally with `height`.
API
AppIcon
| Prop | Type | Description |
|---|---|---|
morph | AppIconMorph | - `"auto"` (default): renders the full lockup (glyph + wordmark) and **morphs to the glyph alone when inside a collapsed `Sidebar`** (`group-data-[collapsible=icon]`) — a crossfade + width transition. Outside a collapsible sidebar it just shows the lockup. - `"mark"` / `"lockup"`: force a fixed variant (no morph). |
height | number | Rendered height in px. Width scales with the variant. Default 24. |
tone | BrandLogoProps["tone"] | Color treatment, forwarded to `BrandLogo`. "auto" reads the per-theme brand tokens. |
title | string | Accessible name, and the wordmark rendered in the lockup. Default "Brand". |
BrandLogo
| Prop | Type | Description |
|---|---|---|
variant | BrandLogoVariant | "mark" = the circle-and-square glyph only; "lockup" = glyph + wordmark. Defaults to "lockup". |
height | number | Rendered height in px. Width scales with the variant. Defaults to 28. |
tone | "auto" | "white" | Color treatment. "auto" (default) reads the per-theme brand-mark tokens, so the mark takes the active theme's approved colorway. "white" forces the fully-white mark for placing ON a colored surface (a primary button, a dark brand chip). |
title | string | Accessible name — AND, in the `lockup` variant, the wordmark that is rendered beside the glyph. Defaults to "Brand". This is the seam that makes the logo unbranded: a consumer passes their own name and gets their own lockup, with no SVG path data to edit. The glyph itself is the only fixed part. |
Theming
The tokens each state resolves to. Change the token and every theme follows.
| State | Token |
|---|---|
| collapsed | mark only; expanded: full lockup |