Breadcrumb: Collapsed
Wrap middle segments in <BreadcrumbCollapse />. They hide behind an ellipsis and slide open in place, and focus moves to the first revealed link. Pass open and onOpenChange to control it.
This adds the example as components/examples/breadcrumb/controlled.tsx, together with the Breadcrumb component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/breadcrumb-controlled.jsonTo add only the component, follow the Breadcrumb installation.
Props in this example
The Breadcrumb props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
href | string | – |
| Prop | Type | Default |
|---|---|---|
open | boolean | – |
onOpenChange | (open: boolean) => void | – |
Every prop is in the Breadcrumb API reference.
See them all, with keyboard support and accessibility notes, on the Breadcrumb page.
- MotionThe easing curves, durations and reduced-motion check every component animates with, plus hooks for size morphs and sliding highlights.
- Navigation menuSite navigation with dropdowns, or one full-width panel that stays open while its content slides between menus.
- PaginationPage navigation that keeps every button in place, glides to the current page and jumps to any page from the ellipsis.
- SidebarAn app sidebar that collapses to icons or off canvas, stays pinned under your header, and becomes a swipeable sheet on phones.
- TabsSwitch between views with an indicator that slides to the active tab, as a segmented control or an underline, and lists that scroll when they overflow.