Browse the docs

Breadcrumb

A trail of marker slashes from home to here. Intermediate pages tuck behind an ellipsis in narrow containers; reveal them with a click, Enter or Space.

Client componentWCAG AA

Props

PropTypeDefaultWhat it does
items requiredreadonly BreadcrumbItem[]—Locations in hierarchy order; the last item is always the current page.
asElementTypeaYour router's link component, e.g. Next.js `Link`.
collapsebooleantrueCollapse intermediate items below 520px of available width.
collapseLabelstringHide intermediate pagesAccessible name when intermediate pages are visible.
expandLabelstringShow intermediate pagesAccessible name for the collapsed trail's disclosure.

Also takes every attribute of <nav> (279 more, e.g. onClick, className, aria-*).

Use it well

DoList locations in hierarchy order. The last item is always the current page. Set href on ancestors; omit it for a non-navigable category.
Don'tUse breadcrumbs as browsing history, or replace primary navigation with them.

Accessibility

  • Native nav with aria-label=Breadcrumb and an ordered list. Override aria-label when more than one trail is present.
  • The final item has aria-current=page and never renders as a link, even if given an href.
  • Marker separators are decorative and hidden from screen readers. Tab visits ancestor links; Enter follows them.
  • Below 520px of container width, a labelled button reveals intermediate items with Enter or Space. It keeps focus and reports aria-expanded.
  • Surface text and focus tokens work across all five surfaces in light and dark. There is no animation, including under reduced motion.
Five stamps!

All aboard.

You took the whole tour. Here's Holo Pip, a foil sticker for riders who finish. It's in your playground tray now, for good.