Breadcrumb
npx shadcn add @klarhimmel/breadcrumbCopy for AIExamples
Basic
Long
Two levels
DetailsAbout, usage, props and more
The path to the current page: links up the tree, then the page itself.
When to use
Use for
Showing where a page sits in a site more than two levels deep.
Not for
Steps in a process. Use a numbered list. Not a replacement for the main navigation.
Pairs with
Header, page titles.
Preview
Import
Import
- Files
- breadcrumb.tsx, in components/klarhimmel/ui/. With it: button, theme, utils. npm: lucide-react.
- Render in
- Render it inside <Theme>, once near the root of your app. Tokens and fonts are scoped to it, so outside it the component is unstyled.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | BreadcrumbItem[] | required | Required. In order from the top. The last item is the current page and is not a link. |
label | string | 'Breadcrumb' | Accessible name of the navigation landmark. |
className | string | - | Extra classes, merged after the component's own. |
Accessibility
| Key | Does |
|---|---|
Tab | Moves through the links |
Enter | Follows a link |
The last item is the current page: aria-current="page", not a link. Long paths wrap; long labels truncate.
Accessibility