Breadcrumbs

Hierarchical navigation that shows the current page path with customizable separators and collapse behavior.

Anatomy

  1. Link items for ancestor pages.
  2. Current page item with aria-current="page".
  3. Separator between items using data-separator.
  4. Overflow indicator () for collapsed paths.

Options

PropertyValuesDefault
itemsArray of { label, url?, current? }
separatorAny short text separator/
collapseresponsive, always, noneresponsive
maxItemsInteger ≥ 2 (used by always)4

Behaviors

  • Truncation: Long labels truncate with ellipsis.
  • Overflow handling: In collapsed states, middle items are represented by .
  • Responsive collapse: In responsive mode, middle items collapse on smaller viewports.
  • Current page: The current item is rendered as text with aria-current, not a link.

Keyboard interactions

KeyAction
TabMoves focus through breadcrumb links.
EnterActivates the focused breadcrumb link.

Accessibility

  • Use semantic <nav aria-label="Breadcrumb"> and ordered list markup.
  • Ensure only the active page item uses aria-current="page".
  • Keep link labels concise and meaningful for screen reader users.