Breadcrumb
Breadcrumb shows where the current page sits in your app, with a link back to each level above it.
<Breadcrumb> <BreadcrumbItem> <BreadcrumbLink href="/">Home</BreadcrumbLink> </BreadcrumbItem> <BreadcrumbItem> <BreadcrumbEllipsis items={hidden} /> </BreadcrumbItem> <BreadcrumbItem> <BreadcrumbPage>Breadcrumb</BreadcrumbPage> </BreadcrumbItem></Breadcrumb>Breadcrumb shows the path from the top of your app to the current page. Every crumb before the last one links back to that level, and the last crumb names the current page as plain text.
Use a breadcrumb when pages sit several levels deep, such as folders, projects or settings sections. Don't use it for the steps of a process or for a history of pages you visited. To switch between views at the same level, use Tabs.
Each BreadcrumbItem draws the chevron that follows it, and the last item draws none, so you never place separators yourself. When a path is too long to show in full, keep the first crumb and the last few, and pass the levels in between to BreadcrumbEllipsis as items. The ellipsis is a button that opens a menu of those levels. Give each item an href, a render element or an onClick.
size sets the text size of the whole path, and the default is 2. The colours are fixed: links use the muted text colour, the current page uses the full text colour, and the chevrons are fainter still. All three adjust for dark mode and high contrast.
Breadcrumb renders a <nav> landmark holding an ordered list, so a screen reader can find it and read it as a path. The landmark is named "Breadcrumb" unless you set label, which is how you name it in your app's language. The current page carries aria-current="page". Tab moves through the links, and the arrow keys move through the ellipsis menu.
Topics
Every symbol this component exports, grouped by the job it does. Each one carries the props it declares; each one has an anchor of its own.
Drawing the path
Breadcrumb
Breadcrumb shows where the current page sits in your app, with a link back to each level above it.
| Prop | Type | What it does |
|---|---|---|
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
label? | string | The accessible name of the <nav> landmark. |
size? | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | Sets the text size of every item in the breadcrumb. |
style? | React.CSSProperties | Inline styles, merged last, so your value wins over anything the component resolved. |
It also takes every prop of a <nav>.
BreadcrumbItem
One level of the path, together with the chevron that follows it. The last item shows no chevron
| Prop | Type | What it does |
|---|---|---|
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
style? | React.CSSProperties | Inline styles, merged last, so your value wins over anything the component resolved. |
It also takes every prop of a <li>.
The levels above the current page
BreadcrumbLink
A level above the current page, as a link back to it. It uses the muted text colour rather than the accent colour a Link uses
| Prop | Type | What it does |
|---|---|---|
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
render? | RenderElement | Renders the link as your framework's own link component, or as an <a> with target and rel. |
style? | React.CSSProperties | Inline styles, merged last, so your value wins over anything the component resolved. |
It also takes every prop of a <a>.
BreadcrumbEllipsis
A button that stands in for the hidden levels and opens a menu of them when pressed
| Prop | Type | What it does |
|---|---|---|
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
items | BreadcrumbEllipsisItem[] | The hidden levels, in path order. |
label? | string | The accessible name of the ellipsis button. |
style? | React.CSSProperties | Inline styles, merged last, so your value wins over anything the component resolved. |
The current page
BreadcrumbPage
The current page at the end of the path, in the full text colour and marked with aria-current="page". It is plain text, because there is nowhere to go
| Prop | Type | What it does |
|---|---|---|
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
style? | React.CSSProperties | Inline styles, merged last, so your value wins over anything the component resolved. |
It also takes every prop of a <span>.
BreadcrumbSeparator— Each item draws the chevron after it and the last item draws none, so separators are always in the right place without you adding them.BreadcrumbList— A breadcrumb is always a landmark that holds a list, soBreadcrumbrenders both and there is nothing to choose between.toneandemphasis— A breadcrumb shows a location and carries no meaning to colour. Its three text colours are fixed so that every breadcrumb in your app looks the same.maxItemsand any automatic collapse — Only you know which levels matter, so the component never drops any on its own. Render the crumbs you want to keep and pass the rest toBreadcrumbEllipsis.- An ellipsis that does nothing — Three dots suggest there is more to see.
BreadcrumbEllipsisrequiresitems, so it always opens a menu of the hidden levels. - Role=link and aria-disabled on the current page — The current page is neither a link nor disabled. It is plain text marked with
aria-current, which is how a screen reader knows you are there.