Breadcrumb
Shows where the page sits and leads back up the path.
Installation
npm i @uisatin/uiimport { Breadcrumb } from '@uisatin/ui/breadcrumb'About 46.6 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.
npx shadcn@latest add https://uisatin.dev/r/breadcrumb.jsonAdds breadcrumb.tsx, dropdown.tsx, kbd.tsx, labels.tsx and pointer-modality.tsx to components/ui and installs iconoir-react.
First time with Satin? Set it up once, styles and fonts included, with the installation guide.
API Reference
The Breadcrumb component renders a nav named "Breadcrumb" around an ordered list. The last item is the current page, with aria-current="page" and no link. Folded items open from a menu button.
| Prop | Type | Default |
|---|---|---|
items | BreadcrumbItem[] | — |
item.label | string | — |
item.icon | ReactNode | — |
item.hideLabel | boolean | false |
item.href | string | — |
item.onSelect | () => void | — |
maxItems | number | — |
className | string | — |
ref | Ref<HTMLElement> | — |
...props | ComponentProps<'nav'>Other attributes go to <nav> | — |
Accessibility
A nav named "Breadcrumb" (aria-label overrides it) around an ordered list. The current page is plain text with aria-current="page". With hideLabel the label stays for screen readers. The separators are hidden. Folded items sit behind a button named "Show 3 more" that opens a menu named "Hidden pages".
| Key | Action |
|---|---|
| EnterorSpaceor↓ | On the "…" button: opens the menu of hidden pages. |
| ↑or↓ | Moves between the hidden pages. |
| EnterorSpace | Goes to the highlighted page. |
| Esc | Closes the menu and returns focus to the "…" button. |
Something wrong or missing on this page?
Report a problemSuggest an improvement