Breadcrumb
Importing
Add rh-breadcrumb to your page with this import statement:
<script type="module">
import '@rhds/elements/rh-breadcrumb/rh-breadcrumb.js';
</script>
Copy to Clipboard
Copied!
Wrap lines
Overflow lines
To learn more about installing RHDS elements on your site using an import map read our getting started docs.
Lightdom CSS
This element requires you to load "Lightdom CSS" stylesheets for styling deeply slotted elements.
Note
Replace /path/to/
with path to the CSS file, whether local or CDN.
<link rel="stylesheet" href="/path/to/rh-breadcrumb/rh-breadcrumb-lightdom.css">
Usage
rh-breadcrumb
A breadcrumb navigation is a secondary navigation element consisting of a list of links to the parent pages of the current page in hierarchical order. It helps users find their place within a website or web application.
Slot Name | Summary | Description |
---|---|---|
|
Place an ordered list ( |
Attribute | DOM Property | Description | Type | Default |
---|---|---|---|---|
accessible-label |
accessibleLabel |
Customize the default |
|
|
variant |
variant |
Sets variants to breadcrumbs |
|
|
truncate |
truncate |
Breadcrumbs over four items will be truncated and include a button to expand the middle breadcrumb items |
|
|
Method Name | Description |
---|---|
firstUpdated() |
Part Name | Summary | Description |
---|---|---|
container |
container element for slotted breadcrumb |
CSS Property | Description | Default |
---|---|---|
--rh-breadcrumb-caret-image |
The default |
{svg encoded as data URI}
|
--rh-breadcrumb-li-padding-inline-end |
Sets the spacing between each breadcrumb item. |
var(--rh-space-lg, 16px)
|
--rh-breadcrumb-link-color |
The link color for each anchor in the list |
var(--rh-color-interactive-primary-default)
|
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.