Breadcrumb
A hierarchy trail with a collapsing middle for deep paths and horizontal scroll on mobile.
Live preview
Source
The exact file rendered in the preview above.
components/demos/breadcrumb.tsx
components/ui/breadcrumb.tsx
Demo source — adapt to your project. Foundry is not published as a package.
Usage
Only where a real hierarchy exists. A breadcrumb that shows how a user got here rather than where "here" sits in the structure is a history list, and it misleads.
- The final crumb is the current page and is never a link.
- On narrow screens the trail scrolls rather than wrapping into an unreadable stack.
- Collapse the middle of deep trails; the first and last crumbs carry most of the meaning.
Variants and states
Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.
- Standard trail
- Collapsed with maxItems
- Two levels
Accessibility
- Landmark
- A `<nav>` labelled "Breadcrumb" wrapping an ordered list.
- Current page
- The last item carries `aria-current="page"`.
- Separators
- Chevrons are `aria-hidden`, so the trail reads "Components, Button" rather than "Components chevron Button".
Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.
Related
All componentsPagination
Real anchors, a fixed-width page window and correctly disabled ends.
starter4 variantsTabs
ARIA tabs with manual activation and three appearances.
intermediate5 variantsDocumentation shell
Header, search and a collapsible section tree that becomes an in-flow outline on mobile.
intermediateFeatured3 variants