Breadcrumb
The trail of pages above this one, so people know where they are.
In Multi-brand
See it live
npm run storybookWhen to use it
In Multi-brand: Where a page sits in the account area.
- Use it when: Deep structure where people may want to go up a level.
- Not when: Steps of a task (progress), or the main navigation.
Instead:
- Progress: Steps of a task, not where a page sits.
- Pagination: Pages of a list, not levels.
Words
- Shared structure: object, state, next step.
- Brand tone lives in headlines and marketing copy, not in errors.
- Errors and confirmations read the same in every brand.
- Use: Get started, Plan, Order. Avoid: Brand-specific words in errors, Jargon.
The labels components use, from the voice tokens:
content.action.commit: Savecontent.action.cancel: Cancelcontent.action.destroy: Removecontent.action.retry: Try againcontent.action.empty-action: Get started
See Voice and tone for the whole voice.
Accessibility and keyboard
Test before you ship:
- It is a navigation landmark, and the current page is marked as current. undefined
Use it in code
npx open-ds add breadcrumb
The component reads only component keys and semantic tokens, so it follows the brand and mode on <html>.
Tokens it reads
Breadcrumb reads 9 tokens of its own, each an alias of a semantic token. Each row is one part: its own token, the semantic it aliases, and the value it ends at. Change a semantic and every component that reads it follows; override one of Breadcrumb's tokens to change Breadcrumb alone.
Multi-brand decides what changes when you switch theme. Here a switch changes colors, type and shape, so the marked rows differ between its brands and between light and dark; everything else holds steady.
| Part | Its token and the semantic it aliases | Value |
|---|---|---|
| List | ||
| Gap | component.breadcrumb.list.gapcomponent-spacing-map.x2var(--breadcrumb-list-gap) | space.8:0.5rem |
| Text size | component.breadcrumb.list.font-sizetype.body.font-sizevar(--breadcrumb-list-font-size) | font.size.16:1rem |
| Text Changes with theme | component.breadcrumb.list.labelcolor.text.mutedvar(--breadcrumb-list-label) | Aster Lightslate-deep.light.600:#4B5A6FAster Darkslate-deep.dark.400:#96A3B5Birch Lightslate-deep.light.600:#4B5A6FBirch Darkslate-deep.dark.400:#96A3B5Coral Lightslate-deep.light.600:#4B5A6FCoral Darkslate-deep.dark.400:#96A3B5 |
| Gap 2 | component.breadcrumb.list.gap-2component-spacing-map.x3var(--breadcrumb-list-gap-2) | space.20:1.25rem |
| Item | ||
| Gap | component.breadcrumb.item.gapcomponent-spacing-map.x2var(--breadcrumb-item-gap) | space.8:0.5rem |
| Link | ||
| Label hover Changes with theme on hover | component.breadcrumb.link.label-hovercolor.text.primaryvar(--breadcrumb-link-label-hover) | Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC |
| Page | ||
| Weight | component.breadcrumb.page.font-weighttype.body.font-weightvar(--breadcrumb-page-font-weight) | font.weight.400:400 |
| Text Changes with theme | component.breadcrumb.page.labelcolor.text.primaryvar(--breadcrumb-page-label) | Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC |
| Breadcrumb | ||
| Icon size | component.breadcrumb.icon-sizesize.iconvar(--breadcrumb-icon-size) | size.16:1rem |