Breadcrumb
On this page
Overview
A breadcrumb provides secondary navigation for showing the user's
hierarchical location within a site. Users must slot an <ol> with
<li> items containing <a> links. The last item should carry
aria-current="page" so screen readers announce the current page.
Keyboard users navigate breadcrumb links with Tab and activate
them with Enter.
Edit element properties
import '@rhds/elements/rh-breadcrumb/rh-breadcrumb.js';
<rh-breadcrumb>
<ol>
<li><a href="#">Home</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Red Hat OpenShift on AWS</a></li>
<li><a href="#">4</a></li>
<li><a href="#">Introduction to ROSA</a></li>
<li><a href="#" aria-current="page">Chapter 1. Understanding ROSA</a></li>
</ol>
</rh-breadcrumb>
<link rel="stylesheet" href="../rh-breadcrumb-lightdom.css">
import { Breadcrumb } from "@rhds/elements/react/rh-breadcrumb/rh-breadcrumb.js";
// NOTE: React 19+ does not require these wrapper imports.
// You can use the custom elements directly as-is.
export const Demo = () => (
<Breadcrumb>
<ol>
<li><a href="#">Home</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Red Hat OpenShift on AWS</a></li>
<li><a href="#">4</a></li>
<li><a href="#">Introduction to ROSA</a></li>
<li>
<a href="#" aria-current="page">Chapter 1. Understanding ROSA</a>
</li>
</ol>
</Breadcrumb>
<link rel="stylesheet" href="../rh-breadcrumb-lightdom.css" />
);
Customizes the aria-label on the internal <nav> element.
Defaults to "Breadcrumb" when not set. Authors should override
this value when more than one breadcrumb navigation appears on
the same page so screen readers can distinguish between them.
Sets the visual variant for the breadcrumb. The subtle variant
uses secondary text color for the current-page item and a muted
separator icon, which authors should use on darker backgrounds
or when the breadcrumb should appear less prominent.
When true, breadcrumb lists with five or more items are truncated: middle items are hidden and replaced by an ellipsis button that users can activate to reveal the full trail. Lists with fewer than five items are not affected. The truncation button is keyboard-accessible and announces its purpose to screen readers.
Status
- Figma library:
-
Ready - RH Elements:
-
Ready - RH Shared Libs:
-
Planned
When to use
- When you want to help orient a user and show where they are in the page hierarchy
- When you want to provide a secondary method for navigating to parent pages of the current page
Status checklist
| Property | Status | Meaning |
|---|---|---|
| Figma library |
|
Component is available in the Figma library |
| RH Elements |
|
Component is available in RH Elements |
| RH Shared Libs |
|
Component will be added to RH Shared Libs |
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.