Components · Navigation
Breadcrumb
StableAdded v0.0.1 · updated v5.1.0
Hierarchical navigation trail showing page location.
import { Breadcrumb } from '@nexub/react';Examples
Default
With ellipsis
Auto-collapse
Breadcrumb.Trail moves the middle of a long path into a menu.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| Breadcrumb.Root aria-label | string | 'breadcrumb' | Accessible label for the nav landmark. |
| Breadcrumb.Link href | string | — | URL the breadcrumb link navigates to. |
| Breadcrumb.Link asChild | boolean | false | Merges props onto the immediate child element, useful for router Link components. |
| Breadcrumb.Trail itemsrequired | { label: ReactNode; href?: string }[] | — | The whole trail from data (5.1), root first; the last item is the current page. |
| Breadcrumb.Trail maxItems | number | 4 | Longer trails keep the first item and the last maxItems - 1, and move the rest into a "More" menu. |
| Breadcrumb.Separator children | React.ReactNode | — | Custom separator element. Defaults to a chevron icon. |
| Breadcrumb.Ellipsis aria-label | string | 'More' | Accessible label for the ellipsis element used to collapse long trails. |
| Breadcrumb.Section | component | — | 11.5: a plain section in the trail, neither a link nor the current page. In Breadcrumb.Trail, an item before the last with no href renders as one. |
On iOS & Android
Web only
Breadcrumb has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.