Navigation
Breadcrumb
Shows where the current page sits in the hierarchy and links back up.
- Experimental
- Keyboard not tested yet
- Screen reader not tested yet
Playground
Change the props and the surface. The controls come from the documented props; the surfaces are the real modes.
<Breadcrumb
label="Playground breadcrumb"
items={[
{ label: "Components", href: "#components" },
{ label: "Button", href: "#button" },
{ label: "Usage" },
]}
/>Usage
When to use
Use a breadcrumb on pages that sit two or more levels deep, so people see where they are and can go back up one level without the main navigation.
When not to use
- On top-level pages: there is no path to show.
- As the only navigation: it complements Nav and SideNav, it doesn't replace them.
- For steps of a process: the order of steps is not a hierarchy.
How it works
Each level is a link except the last, which is the current page and marked with aria-current="page". The trail starts at the section, not at the home page, and is named by the label prop so several breadcrumbs on one page stay distinct.
Content guidelines
Use the page titles exactly as they appear in the navigation. Don't shorten or rename them here; a breadcrumb that says something else than the page it links to breaks trust.
Do and don’t
Do
- Start at the section, not at the home page.
Don’t
- Don't use it as the only navigation.
Anatomy
The parts of the component and what each one does, as in the playground above.
- linkParent pages in text.secondary, underlined on hover.
- separatorChevron, decorative.
- labelCurrent page in text.primary, not a link.
Examples
Type-checked, and the same code goes into the AI manifest. Import: import { Breadcrumb } from "@/ds";
Three levels
Props
Checked against the component's TypeScript type on every build.
| Name | Type | Default | Description |
|---|---|---|---|
| items (required) | BreadcrumbItem[] | – | label and href; the last item is the current page. |
| label | string | "Breadcrumb" | Accessible name; change it only when a page has two breadcrumbs. |
Tokens used
Derived from the utility classes in the component's source. Copy a class with one click.
| Token | Tier | Value | Utility |
|---|---|---|---|
| breadcrumb.fg | component | #555555 | |
| breadcrumb.fgCurrent | component | #0A0A0B | |
| link.radius | component | 4px | |
| focus | semantic | #C6492E | |
| spacing.2 | semantic | 8px | |
| spacing.3 | semantic | 12px | |
| surface.page | semantic | #FAFAF7 | |
| type.small.size | semantic | 14px |
Accessibility
What is checked automatically on every build, and what a person has tested. Nothing is marked as tested unless it was.
| Check | How | Status |
|---|---|---|
| axe-core rules | Automated on every npm run check, at desktop and mobile width | Runs on every build |
| Keyboard | Automated Playwright test (scripts/keyboard.mjs) | Not tested yet |
| Screen reader | Manual | Not tested yet |
Keyboard
| Key | Action |
|---|---|
| Tab | Moves through the parent links. |
Semantics and focus
- <nav aria-label="Breadcrumb"> with an ordered list.
- The current page has aria-current="page"; separators are aria-hidden.
Contrast
| Pairing | Ratio (x:1) | Minimum | Status |
|---|---|---|---|
| text.primary on surface.page | 18.92 | 4.5 | Pass |
| text.secondary on surface.page | 7.13 | 4.5 | Pass |
| focus on surface.page | 4.57 | 3.0 | Pass |