Skip to content
Fleetline

Breadcrumbs

Usage

Use breadcrumbs on pages three or more levels deep (Fleet › depot › vehicle type › vehicle) so people can see where they are and step back up. Don't use them on top-level pages or for step-by-step flows (use a stepper).

Anatomy

  1. Landmark — nav.breadcrumbs[aria-label=Breadcrumb]
  2. Ordered list — ol.breadcrumbs__list
  3. Ancestor link — a.breadcrumbs__link
  4. Separator — "/" drawn by CSS, not read aloud
  5. Current page — span.breadcrumbs__current[aria-current=page]
  6. Overflow (optional) — button.breadcrumbs__more + ul.breadcrumbs__overflow[popover]

Examples

States marked hover, focus-visible and active are frozen with .is-hover, .is-focus-visible, .is-active. Those classes share their rule with the real pseudo-class, so what you see is exactly what users get. Never use them in product code.

API

HookValuesPurpose
.breadcrumbsblock class<nav>; inline-size container
.breadcrumbs__list | __item | __link | __currentpartsTrail
.breadcrumbs__more, .breadcrumbs__overflowpartsCollapsed levels (popover via invoker)
aria-current="page"attributeCurrent page

Do and don't

Do end with the current page as plain text.

Fleet > Vans > Van KX-219 (link to itself)

Don't make the current page a link or type separators into the text.

Accessibility

Keyboard interaction
KeyBehavior
TabMoves through the links (and the "…" button)
EnterFollows a link; on "…" opens the hidden levels
EscCloses the hidden-levels list, focus returns to "…"

Tokens

Custom propertyPurpose
--color-text-linkAncestor links
--color-text-defaultCurrent page
--color-text-subtleSeparator
--color-elevation-surface-overlay, --overlay-radius | -shadowOverflow list
--focus-ring-*Focus ring