Default
Show the codeHide the code
Default, code
<Breadcrumb>
<BreadcrumbItem href="#home">Home</BreadcrumbItem>
<BreadcrumbItem href="#settings">Settings</BreadcrumbItem>
<BreadcrumbItem>Team members</BreadcrumbItem>
</Breadcrumb>Shows where the page sits in the site: a nav of links ending in the current page.
These are the real React components. Use them with a mouse, touch or keyboard, and switch the theme and density for every example at once.
Default, code
<Breadcrumb>
<BreadcrumbItem href="#home">Home</BreadcrumbItem>
<BreadcrumbItem href="#settings">Settings</BreadcrumbItem>
<BreadcrumbItem>Team members</BreadcrumbItem>
</Breadcrumb>Long, code
<Breadcrumb>
<BreadcrumbItem href="#home">Home</BreadcrumbItem>
<BreadcrumbItem href="#projects">Projects</BreadcrumbItem>
<BreadcrumbItem href="#northwind">Northwind redesign</BreadcrumbItem>
<BreadcrumbItem href="#research">Research</BreadcrumbItem>
<BreadcrumbItem>Interview notes, round two</BreadcrumbItem>
</Breadcrumb>The 7 design tokens Breadcrumb reads, with the value each has in the theme and density chosen above. Change a token and the component follows, in Figma and in code.
| Token | Value now | CSS variable |
|---|---|---|
| color.icon.default | … | --sd-color-icon-default |
| color.text.default | … | --sd-color-text-default |
| color.text.link | … | --sd-color-text-link |
| color.text.link-pressed | … | --sd-color-text-link-pressed |
| radius.xs | … | --sd-radius-xs |
| spacing.gap.xs | … | --sd-spacing-gap-xs |
| target.min | … | --sd-target-min |
The npm package isn’t published yet. When it is, this is the install line; until then, this page runs the same build of the package (from commit fa3abf8).
Install
npm i @superduperui/react @superduperui/tokensImport
import { Breadcrumb, BreadcrumbItem } from "@superduperui/react"Breadcrumb also takes the props of the React Aria component it’s built on.
| Prop | Type | What it does |
|---|---|---|
childrenrequired | ReactNode | BreadcrumbItem elements, from the top level down to the current page (last). |
aria-label | stringDefault 'Breadcrumb' | Names the navigation landmark. Default "Breadcrumb". |
className | string |
Screen readers announce "Breadcrumb, navigation" then "Settings, link" and "Team members, current page".
WCAG 2.2 AAA criteria the component meets in Comfortable density: 1.4.6, 1.4.9, 2.1.3, 2.3.2, 2.4.13, 2.5.5, 2.5.6.
Compact density meets AA (2.5.8, 24px targets), not AAA.
Shared patterns it ships with: 2.4.8 (aria-current="page" says where you are).
| axe-core (WCAG A, AA, AAA and best practice) | 60 runs across every story, theme, density and width: 0 violations |
|---|---|
| Rendered text contrast | 80 text runs: 0 below 7:1, lowest 8.42:1 |
| Target size | 22 targets: 0 under 44px in Comfortable |
| Focus appearance (2.4.13) | 36 focus stops in 3 browser engines: all pass |
| Keyboard script | Chromium 2 of 2, Firefox 2 of 2, WebKit 2 of 2 |
Manual passes with VoiceOver and NVDA haven’t been done yet.
Each step is scripted and run in Chromium, Firefox and WebKit.
| Key | What happens |
|---|---|
| Tab | Tab reaches the first crumb |
| Tab | Tab reaches the next crumb |
The Figma component is Breadcrumb. The Figma library isn’t published yet.
Figma to code: Items → children.