Navigation
Breadcrumb
Where a page sits in the hierarchy.
Usage
A nav with an ordered list. Ancestors are links, the last item is the current page and is announced with aria-current="page".
When to use
- Sites and apps with a real hierarchy three or more levels deep: projects, folders, documentation.
- Pages people reach from search or a shared link, where “where am I?” is not obvious.
Not for: flat sites, wizard steps (use a stepper) or a record of the pages someone visited.
Separator
Chevrons by default. Set separator="slash" on the breadcrumb for paths and repositories, or pass your own children to BreadcrumbSeparator.
Collapsed middle
BreadcrumbEllipsis is a button, so it can open a dropdown menu holding the hidden levels. Collapse the middle, never the first or last item.
As a link
asChild renders your element, such as a Next.js Link, with the breadcrumb link styles.
API
Breadcrumb
| Prop | Type | Default | Description |
|---|---|---|---|
| separator | 'chevron' | 'slash' | 'chevron' | Glyph drawn by every BreadcrumbSeparator without children. |
| ...props | HTMLAttributes<HTMLElement> | — | Forwarded to the nav. aria-label defaults to "Breadcrumb". |
BreadcrumbLink
| Prop | Type | Default | Description |
|---|---|---|---|
| asChild | boolean | false | Render the child element with the link styles. |
| ...props | AnchorHTMLAttributes | — | Forwarded to the anchor. |
BreadcrumbList (ol), BreadcrumbItem (li), BreadcrumbPage (current page), BreadcrumbSeparator and BreadcrumbEllipsis (button) forward their ref, className and native props.
Keyboard
| Key | Action |
|---|---|
| Tab | Moves through the links and the ellipsis button. |
| Enter | Follows a link or opens the ellipsis menu. |
Accessibility
- WAI-ARIA breadcrumb pattern: nav landmark labelled “Breadcrumb”, an ordered list, aria-current="page" on the last item.
- Separators are decorative (aria-hidden) so screen readers read only the levels.
- Long names wrap instead of overflowing; the ellipsis button is labelled “Show hidden pages”.
Motion
- Links and the ellipsis change colour in 150ms; nothing moves.
- Hover styles only apply to fine pointers.