Subnavigation
Installation
Learn more about how to install on our getting started docs.
<script type="module">
  import '@rhds/elements/rh-subnav/rh-subnav.js';
</script>Import Map Example
<script type="importmap">
  {
    "imports": {
      "@rhds/elements/": "https://www.redhatstatic.com/dx/v1-alpha/@rhds/elements@2.0.1/elements/",
    }
  }
</script>npm install @rhds/elements<script type="module">
  import '@rhds/elements/rh-subnav/rh-subnav.js';
</script><script type="module">
  import '@rhds/elements/rh-subnav/rh-subnav.js';
</script>Import Map Example
<script type="importmap">
{
  "imports": {
    "@rhds/elements/rh-subnav/rh-subnav.js": "./elements/rh-subnav/rh-subnav.js"
  },
  "scopes": {
    "./": {
      "@patternfly/pfe-core/": "https://ga.jspm.io/npm:@patternfly/pfe-core@4.0.2/",
      "@patternfly/pfe-core/ssr-shims.js": "https://ga.jspm.io/npm:@patternfly/pfe-core@4.0.2/core.js",
      "@rhds/elements/rh-icon/rh-icon.js": "./elements/rh-icon/rh-icon.js",
      "@rhds/icons": "https://ga.jspm.io/npm:@rhds/icons@1.1.2/icons.js",
      "@rhds/tokens/css/": "https://ga.jspm.io/npm:@rhds/tokens@2.1.0-next.15/css/",
      "lit": "https://ga.jspm.io/npm:lit@3.2.0/index.js",
      "lit/": "https://ga.jspm.io/npm:lit@3.2.0/",
      "tslib": "https://ga.jspm.io/npm:tslib@2.7.0/tslib.es6.mjs"
    },
    "https://ga.jspm.io/": {
      "@lit/reactive-element": "https://ga.jspm.io/npm:@lit/reactive-element@2.0.4/development/reactive-element.js",
      "@lit/reactive-element/decorators/": "https://ga.jspm.io/npm:@lit/reactive-element@2.0.4/development/decorators/",
      "@patternfly/pfe-core/": "https://ga.jspm.io/npm:@patternfly/pfe-core@4.0.2/",
      "lit": "https://ga.jspm.io/npm:lit@3.2.0/index.js",
      "lit-element/lit-element.js": "https://ga.jspm.io/npm:lit-element@4.1.0/development/lit-element.js",
      "lit-html": "https://ga.jspm.io/npm:lit-html@3.2.0/development/lit-html.js",
      "lit-html/": "https://ga.jspm.io/npm:lit-html@3.2.0/development/",
      "tslib": "https://ga.jspm.io/npm:tslib@2.7.0/tslib.es6.mjs"
    }
  }
}
</script>Lightdom CSS
This element requires you to load "Lightdom CSS" stylesheets for styling deeply slotted elements.
<link rel="stylesheet" href="/path/to/rh-subnav/rh-subnav-lightdom.css">Note
Replace /path/to/ with path to the CSS file, whether local or CDN.
rh-subnav
| Slot Name | Description | 
|---|---|
|  | Navigation links, expects collection of  | 
None
None
None
| Part Name | Description | 
|---|---|
| container | container,  | 
| links | 
 | 
None
| Token | Copy | 
|---|---|
| --rh-border-width-lg |  | 
| --rh-border-width-md |  | 
| --rh-border-width-sm |  | 
| --rh-color-accent-brand |  | 
| --rh-color-border-interactive |  | 
| --rh-color-border-subtle |  | 
| --rh-color-gray-10 |  | 
| --rh-color-interactive-primary-default |  | 
| --rh-color-surface |  | 
| --rh-color-text-primary |  | 
| --rh-color-text-secondary |  | 
| --rh-space-2xl |  | 
| --rh-space-lg |  | 
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.