When to Use
Use Breadcrumb when people may need to move from the current page back through
its parent pages, such as from a product to its category. Use Pagination to
move between numbered result pages, and use NavList for a general set of
destinations that does not describe the current page's ancestry.
Features
The behavior Atom owns before your product adds appearance.
- Renders a named breadcrumb
nav landmark.
- Uses an ordered list for page hierarchy.
- Uses native anchors for ancestor links.
- Marks the current page with
aria-current="page".
- Hides Separator content from assistive technology.
- Provides an Ellipsis that can remain text or compose an interactive control.
- Supports
asChild and render on every part.
Import
Anatomy
API Reference
Root
Renders the nav landmark that contains the complete breadcrumb trail. It
supplies a default accessible name and accepts native nav props.
asChild | boolean | false |
render | RenderProp | - |
ariaLabel | string | "Breadcrumb" |
aria-label | Value from ariaLabel |
List
Renders the ordered ol that communicates the hierarchy of breadcrumb Items.
Place Items and decorative Separators inside it.
asChild | boolean | false |
render | RenderProp | - |
[data-slot] | "breadcrumb-list" |
Item
Renders an li for one level in the page hierarchy. It can contain an ancestor
Link, the current Page, or an Ellipsis control.
asChild | boolean | false |
render | RenderProp | - |
[data-slot] | "breadcrumb-item" |
Link
Renders a native a for an ancestor page. Native anchor props such as href,
target, and rel pass through.
asChild | boolean | false |
render | RenderProp | - |
[data-slot] | "breadcrumb-link" |
Separator
Renders a decorative li between hierarchy levels. Its content defaults to
/ and is always removed from the accessibility tree.
children | ReactNode | "/" |
asChild | boolean | false |
render | RenderProp | - |
role | "presentation" |
aria-hidden | "true" |
[data-slot] | "breadcrumb-separator" |
Ellipsis
Renders a span containing … by default to represent collapsed hierarchy
levels. Use asChild with a real button when it opens hidden pages or a menu.
children | ReactNode | "…" |
asChild | boolean | false |
render | RenderProp | - |
[data-slot] | "breadcrumb-ellipsis" |
Page
Renders a non-link span for the current page and marks it as the current
location. A breadcrumb trail should contain only one Page.
asChild | boolean | false |
render | RenderProp | - |
[data-slot] | "breadcrumb-page" |
Examples
Basic Breadcrumb
Expand Collapsed Pages
Accessibility
Breadcrumb follows the
WAI-ARIA Breadcrumb pattern.
Root provides a named navigation landmark, List communicates hierarchy, and
Page exposes aria-current="page". Ancestor Links keep normal browser link
keyboard behavior; Breadcrumb adds no custom keyboard interaction.
Separators are presentational and hidden from assistive technology. If an
Ellipsis is interactive, compose it with a native button and give that button a
label that explains what it reveals.
Changelog
Unreleased
- Added public Agent Knowledge for component selection, required composition,
recurring mistakes, and validation.
0.2.0
- Changed
Breadcrumb.Root to use the Atom-style ariaLabel prop for the
breadcrumb navigation landmark label while still rendering native
aria-label.
0.1.0