Skip to main content

Breadcrumb

The trail of pages above this one, so people know where they are.

In Brand expressive

See it live​

Start Storybook to see it live: npm run storybook

When to use it​

In Brand expressive: On a page below a site section, the way back up to it. Not on the launch page itself.

  • 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​

  • Headlines are short and bold. Three to six words.
  • Verbs that move: Join, Try, Go.
  • Playful in headlines, plain in errors.
  • Use: Join, Drop, Go, Love. Avoid: Synergy, Leverage, Kindly.

The labels components use, from the voice tokens:

  • content.action.commit: Go
  • content.action.cancel: Not now
  • content.action.destroy: Remove
  • content.action.retry: Try again
  • content.action.empty-action: Explore the drop

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.

Changes with theme

Brand expressive 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.

PartIts token and the semantic it aliasesValue
List
Gapcomponent.breadcrumb.list.gapcomponent-spacing-map.x2var(--breadcrumb-list-gap)space.8:0.5rem
Text sizecomponent.breadcrumb.list.font-sizetype.body.font-sizevar(--breadcrumb-list-font-size)font.size.17:1.0625rem
Text
Changes with theme
component.breadcrumb.list.labelcolor.text.mutedvar(--breadcrumb-list-label)Lighttaupe.light.600:#6B544ADarktaupe.dark.400:#B5988A
Gap 2component.breadcrumb.list.gap-2component-spacing-map.x3var(--breadcrumb-list-gap-2)space.24:1.5rem
Item
Gapcomponent.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)Lighttaupe.light.900:#1F1411Darktaupe.dark.900:#FFF8F3
Page
Weightcomponent.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)Lighttaupe.light.900:#1F1411Darktaupe.dark.900:#FFF8F3
Breadcrumb
Icon sizecomponent.breadcrumb.icon-sizesize.iconvar(--breadcrumb-icon-size)size.20:1.25rem