Skip to main content

BrandLogo

Iconsdisplay

The product's mark/lockup, drawn from tokens so it adapts to every theme.

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

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

  • Hardcoding a brand fill — the mark uses currentColor/tokens so it adapts per theme.
  • Hand-rolling the mark↔lockup swap in app chrome — AppIcon wraps BrandLogo and morphs on sidebar collapse.

Works with

Used inside

Examples

6 live examples

Mark

Mark-only variant: glyph without the wordmark, useful in compact nav bars.

Large Lockup

Larger lockup: height prop scales both the glyph and the wordmark.

Sizes

All sizes side-by-side to verify proportional scaling.

Variants

Both variants next to each other for a quick comparison.

On Every Surface

The mark is background-adaptive with no prop: the drawn linework is `currentColor`, so it inks itself from whatever surface it lands on. Switch the theme toolbar to see the same three surfaces re-ink. `tone="white"` is the one override, for a colored plate where `currentColor` would be the plate's own ink.

API

PropTypeDescription
variantBrandLogoVariant"mark" = the circle-and-square glyph only; "lockup" = glyph + wordmark. Defaults to "lockup".
heightnumberRendered 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).
titlestringAccessible 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.

Also accepts: SVGProps<SVGSVGElement>

Theming

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

StateToken
colorcurrentColor / brand tokens