@zendeskgarden/react-breadcrumbs package provides an accessible Breadcrumb component that renders a <nav> landmark with chevron-separated links. The last item is automatically marked as the current page via aria-current="page".
Installation
Place a
ThemeProvider from @zendeskgarden/react-theming at the root of your React application. All Garden components must be rendered inside a ThemeProvider.Usage
Basic breadcrumb
Pass any React nodes as children. TheBreadcrumb component inserts chevron separators between items and applies aria-current="page" to the last child automatically.
Deep hierarchy
Breadcrumb
TheBreadcrumb component renders a <nav> element with an ordered list of items separated by chevron icons. It uses @zendeskgarden/container-breadcrumb internally for accessibility logic.
Accessibility
- Renders as a
<nav>landmark witharia-label="Breadcrumbs"by default. - The last child automatically receives
aria-current="page". - Chevron separators are hidden from assistive technology.
Props
Accessible label for the
<nav> landmark. Override this with a localized string when targeting non-English users.HTMLAttributes<HTMLElement> props are forwarded to the <nav> element.
Exports
The following are exported from@zendeskgarden/react-breadcrumbs:
| Export | Description |
|---|---|
Breadcrumb | Breadcrumb navigation container |