Put each step as a direct child: native <a> links for ancestors and a plain element for the current page, which is marked with aria-current="page" automatically. Links keep their destinations, modified clicks and listeners, so no router is needed. Name the landmark with label when a page has more than one navigation. An authored
aria-current is preserved. An actionable terminal item remains actionable and is
not automatically relabeled as current-page text.
Separator
Custom separator
Default density
Compact density
Restart from the initial state
Show the copyable source
The default separator is a chevron that mirrors in right-to-left layouts. separator swaps it for text, such as a slash for file paths. Separators are hidden from assistive technology.
Collapsed ancestors
Collapsed with a menu
Default density
Compact density
Restart from the initial state
Show the copyable source
Collapsing is up to you: replace the middle ancestors with a named Button that opens a Menu of the hidden links. If the omission doesn’t need to be reachable, use a decorative mark with aria-hidden="true" and data-breadcrumb-ellipsis instead.
Decorative ellipsis
Default density
Compact density
Restart from the initial state
Show the copyable source
The mark gets separators like any step but is skipped by screen readers and never takes focus. Use it when the omitted pages are reachable another way, such as from the account menu.
Ancestor menu
Section menu on an ancestor
Default density
Compact density
Restart from the initial state
Show the copyable source
An ancestor can open a menu of its sibling sections, so readers jump sideways without going up a level first. The trigger shows the ancestor’s own name, with a chevron to say it opens a list.
Responsive collapse
Menu on wide screens, drawer on narrow ones
Default density
Compact density
Restart from the initial state
Show the copyable source
On a phone, a drawer of hidden pages is easier to tap than a menu. The breadcrumb keeps the same trail either way; your code picks the surface for the viewport, and each one keeps its own focus and dismissal. Resize the window across 768 px to switch.
Wrapping
Long trail
Default density
Compact density
Restart from the initial state
Show the copyable source
In a narrow container the trail wraps instead of overflowing. Collapse ancestors when a wrapped trail would push content too far down.
API Reference
Every element also accepts motion-policy.
Attributes
AttributePropertyTypeDefaultDescriptionlabellabelstring'Breadcrumb'Accessible name of the landmark; set it when the page has more than one navigation.separatorseparatorstring''Decorative text between steps, such as / for a file path; empty draws a chevron that mirrors in right-to-left layouts.
Slots
SlotDescriptiondefaultThe steps in order: ancestor links, then the current page; a Menu can stand in for collapsed ancestors.
CSS parts
PartDescription::part(breadcrumb)The navigation landmark around the trail.::part(breadcrumb-current-page)The step marked as the current page.::part(breadcrumb-ellipsis)A child marked data-breadcrumb-ellipsis: a decorative mark for omitted ancestors.::part(breadcrumb-item)The list item around each step.::part(breadcrumb-link)An ancestor link: the caller's own anchor, outside any composed Menu.::part(breadcrumb-ordered-list)The ordered list of steps.::part(breadcrumb-separator)The separator between two steps, hidden from assistive technology.