Navigation link
Importing
Add rh-navigation-link to your page with this import statement:
<script type="module">
import '@rhds/elements/rh-navigation-link/rh-navigation-link.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.
Usage
<rh-navigation-link href="#link">Link</rh-navigation-link>
<rh-navigation-link><a href="#link">Slotted a href Link</a></rh-navigation-link>
<rh-navigation-link icon="auto-light-dark-mode" icon-set="ui" href="#ai">Containers</rh-navigation-link>
<script type="module">
import '@rhds/elements/rh-navigation-link/rh-navigation-link.js';
</script>
Copy to Clipboard
Copied!
Wrap lines
Overflow lines
rh-navigation-link
Navigation Link is a link that is used as a child of the primary, secondary, subnav, and vertical navigation elements. The link is intrinsically an list item and should not be used outside of navigation elements that define the parent list element.
| Slot Name | Summary | Description |
|---|---|---|
icon |
Use this slot when the |
|
|
The default slot should contain the link text when the |
| Attribute | DOM Property | Description | Type | Default |
|---|---|---|---|---|
icon |
icon |
Shorthand for the |
|
|
icon-set |
iconSet |
Icon set for the |
|
|
href |
href |
The URL to navigate to when the link is clicked |
|
|
current-page |
currentPage |
Indicates that this link refers to the current page for accessibility; used with the |
|
|
| Method Name | Description |
|---|---|
scheduleUpdate() |
| Token | Summary | Copy |
|---|---|---|
--rh-color-text-primary
|
|
|
--rh-color-interactive-primary-hover
|
|
|
--rh-color-gray-50
|
|
|
--rh-color-gray-40
|
|
|
--rh-border-width-md
|
|
|
--rh-color-interactive-primary-default
|
|
|
--rh-border-radius-default
|
|
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.