Breadcrumb
A hierarchical navigation trail that shows the user's location within a site or app.
Wraps items in a nav landmark with aria-label; the current page receives aria-current="page"; separators are role="presentation".
import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage,} from "@arshad-shah/cynosure-react";
<Breadcrumb> <BreadcrumbItem> <BreadcrumbLink href="/">Home</BreadcrumbLink> </BreadcrumbItem> <BreadcrumbItem> <BreadcrumbLink href="/components">Components</BreadcrumbLink> </BreadcrumbItem> <BreadcrumbItem isCurrent> <BreadcrumbPage>Breadcrumb</BreadcrumbPage> </BreadcrumbItem></Breadcrumb>Separators are interleaved between BreadcrumbItem children automatically — you don’t need to add them yourself.
Variants
Section titled “Variants”Custom separator
Section titled “Custom separator”Pass a separator ReactNode to swap the default chevron for any glyph.
Collapsed middle items
Section titled “Collapsed middle items”Set maxItems to collapse the middle of a long trail into a BreadcrumbEllipsis. Tune which items stay visible at each end with itemsBeforeCollapse (default 1) and itemsAfterCollapse (default 2).
With a leading icon
Section titled “With a leading icon”BreadcrumbLink accepts any children, so an inline SVG renders alongside the label.
PropTypeDefaultDescription
separator
ReactNode
—
Element rendered between items. Defaults to a small Lucide
`ChevronRight` glyph.
maxItems
number
—
Collapse middle items when the total exceeds this count. Omit for an
uncollapsed trail.
itemsBeforeCollapse
number
1
Items kept visible at the start of the trail when collapsing.
itemsAfterCollapse
number
2
Items kept visible at the end of the trail when collapsing.
renderCollapsed
((hiddenItems: ReactElement<unknown, string | JSXElementConstructor<any>>[]) => ReactNode)
—
Custom collapsed-items trigger. Defaults to a `BreadcrumbEllipsis`
button — replace with e.g. a `DropdownMenu` listing the hidden links.
aria-label
string
"Breadcrumb"
Accessible label on the wrapping `<nav>`.
Accessibility
Section titled “Accessibility”- The root renders a
<nav>witharia-label="Breadcrumb"(override via thearia-labelprop). - Items render as
<li>inside an<ol>so the trail order is exposed to assistive tech. BreadcrumbItemcarriesaria-current="page"whenisCurrentis set;BreadcrumbPagealways carriesaria-current="page".- Separators are
<li role="presentation" aria-hidden="true">so they don’t pollute the announcement. - The collapsed-items trigger is a real
<button>(rendered viaIconButton) with"Show more"as its default label.
Recipes
Section titled “Recipes”- Pair
<BreadcrumbItem isCurrent>with<BreadcrumbPage>so both the<li>and the inner element announce the current page. - Use
renderCollapsedto wire the ellipsis to aDropdownMenulisting the hidden links. - Lower
maxItems(e.g.3) on mobile breakpoints to shorten the trail. - Replace the default chevron with a
/glyph for a more typographic look.