Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Web component for brand/logo display with automatic dark/light logo switching. Use in headers, footers, and anywhere you need consistent brand representation.
The <brand-mark> element provides a consistent way to display your brand name and logo. It handles typography, spacing, link styling, and automatic dark/light logo switching.
Progressive enhancement: without JavaScript, text content always renders. With JavaScript, the component injects images from the src attribute and observes color mode changes to swap between light and dark logos.
| Attribute | Values | Default | Description |
|---|---|---|---|
src |
URL | - | Path to logo image (SVG preferred). Used in light mode or as the default when no src-dark is provided. |
src-dark |
URL | - | Path to dark-mode logo. Auto-switches based on prefers-color-scheme and data-mode attribute. |
src-compact |
URL | - | Path to compact/icon logo for narrow contexts (e.g., mobile headers). |
alt |
string | text content | Alt text for the logo image. Defaults to the element's text content. |
wordmark |
boolean | - | Show text alongside the image logo. Without this, only the image is shown. |
height |
number (px) | - | Explicit pixel height for the logo image. |
data-size |
s, l, xl |
- | Adjust brand mark size |
data-stack |
boolean | - | Stack logo and text vertically |
Wrap your brand name in the element, optionally with a logo image. Use an empty alt on the image since the brand name provides the text alternative.
<brand-mark> <img src="/logo.svg" alt="" /> Acme Inc</brand-mark>
srcUse the src attribute to load a logo image. The JS enhancement injects an <img> element automatically. Without JS, the text content renders as a fallback — this is progressive enhancement.
<brand-mark src="/logo.svg" alt="Acme Inc"> Acme Inc</brand-mark>
By default, only the image is shown. The text content becomes the alt text or aria-label.
Add the wordmark attribute to show the brand name text alongside the logo image.
<brand-mark src="/logo.svg" wordmark> Acme Inc</brand-mark>
Use height to control the image size explicitly. The CSS token --brand-mark-height can also be set by themes.
<brand-mark src="/logo.svg" wordmark height="40"> Acme Inc</brand-mark>
Use src-dark to provide an alternate logo for dark mode. The component automatically switches between logos based on the system prefers-color-scheme preference and the VB data-mode attribute on <html>.
<brand-mark src="/logo-light.svg" src-dark="/logo-dark.svg" wordmark> Acme Inc</brand-mark>
The switching happens reactively — toggling the color mode in the settings panel or changing the system preference immediately updates the displayed logo with no page reload.
If only src is provided without src-dark, that logo is used in both modes.
Nest an <em> or <small> inside <brand-mark> to display a tagline or subtitle. Combine with data-stack for vertical layouts commonly used in footers.
<brand-mark data-stack> Acme Inc <em>Making things better</em></brand-mark>
The tagline renders in a smaller, muted font with italic style. It works in both inline and stacked layouts.
Use data-size to adjust the brand mark for different contexts.
<brand-mark data-size="s">Small</brand-mark> <brand-mark>Default</brand-mark> <brand-mark data-size="l">Large</brand-mark> <brand-mark data-size="xl">Extra Large</brand-mark>
Use data-stack for vertical logo and text arrangement. Useful for centered layouts like login pages or footers.
<brand-mark data-stack> <img src="/logo.svg" alt="" /> Acme Inc</brand-mark>
Wrap in an anchor to make the brand mark clickable. The element automatically removes link underlines and adjusts hover states.
<a href="/"> <brand-mark> <img src="/logo.svg" alt="" /> Acme Inc </brand-mark></a>
Common usage in site headers with navigation.
<header> <nav> <a href="/"> <brand-mark> <img src="/logo.svg" alt="" /> Acme Inc </brand-mark> </a> <!-- Navigation items --> </nav></header>
src attribute without wordmark, the text content is used as aria-label or image altwordmark, the image gets alt="" (decorative) since the visible text provides the label<img> child, set alt="" since the brand name text provides the text alternativesrc attribute has no effect — text content always provides a readable fallback<img> or <svg> (logo)Any flow content. Commonly placed inside <a>, <header>, or <nav>.
| Token | Default | Description |
|---|---|---|
--brand-mark-height |
2rem |
Height of the logo image (set by themes) |
<header> — Sectioning element for page headers