Breadcrumb
The trail of pages above this one, so people know where they are.
In Content first
See it live
npm run storybookWhen to use it
In Content first: Shows where a guide sits.
- 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
- Write to one person: "you", not "users".
- Short sentences with room to breathe.
- Explain why before asking for anything.
- Use: Read, Save for later, You, Next issue. Avoid: Click here, Submit, Users, Content.
The labels components use, from the voice tokens:
content.action.commit: Savecontent.action.cancel: Not nowcontent.action.destroy: Removecontent.action.retry: Try againcontent.action.empty-action: Browse guides
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.
Content first decides what changes when you switch theme. Here a switch changes colors only, so the marked rows differ 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.18:1.125rem |
| Text Changes with theme | component.breadcrumb.list.labelcolor.text.mutedvar(--breadcrumb-list-label) | Lightstone.light.600:#61594DDarkstone.dark.400:#A39A8B |
| 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) | Lightstone.light.900:#1F1B16Darkstone.dark.900:#FFFDF8 |
| 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) | Lightstone.light.900:#1F1B16Darkstone.dark.900:#FFFDF8 |
| Breadcrumb | ||
| Icon size | component.breadcrumb.icon-sizesize.iconvar(--breadcrumb-icon-size) | size.16:1rem |