Breadcrumbs
A navigation trail that collapses its middle into a menu once the path gets deep. The last item is always the current page (non-link). Choose between a slash or chevron separator.
Installation
npx stepwise-ui add breadcrumbs
Slash separator
Chevron separator
Overflow
Past maxItems the middle collapses to a … that opens a menu of the hidden crumbs - picking one jumps straight there, the row itself never expands. The head and the current page always survive.
Props
PropTypeDescription
itemsBreadcrumbItem[]Ordered path items. Last item is the current page.
separator"slash" | "chevron"Separator style. Default "slash".
maxItemsnumberCollapse the middle past this many crumbs. 0 never collapses. Default 4.
itemsBeforenumberCrumbs kept at the head when collapsed. Default 1.
itemsAfternumberCrumbs kept at the tail when collapsed. Default 2.
onNavigate(item, index) => voidCalled on crumb click; prevents the default href navigation.
BreadcrumbItem
PropTypeDescription
labelstringVisible text.
hrefstringLink target. Omit on the last (current) item.