Skip to main content Red Hat Design System logo Contribute on Github

Navigation (secondary)

Overview Style Guidelines Code Accessibility

Overview

The Secondary navigation is used to connect a series of pages together. It displays wayfinding content and links relevant to the page it is placed on. It should be used in conjunction with the primary navigation.

Status

What do these mean?
Figma library:
Ready
Responsive:
Ready
RH Elements:
Ready
webRH:
Ready

Sample element

Image of two stacked secondary navigations; one for large breakpoints and the other for small breakpoints

Demo

<rh-navigation-secondary role="navigation">
<a href="#" slot="logo" id="logo-id" aria-current="page">
Logo/Title
</a>
<ul slot="nav" aria-labelledby="logo-id">
<li>
<rh-navigation-secondary-dropdown>
<a href="#dropdown-fallback-url" slot="link">Dropdown</a>
<rh-navigation-secondary-menu slot="menu">
<rh-navigation-secondary-menu-section>
<h3 slot="header">Section</h3>
<ul slot="links">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
<rh-cta slot="cta">
<a href="#">Section CTA</a>
</rh-cta>
</rh-navigation-secondary-menu-section>
<rh-navigation-secondary-menu-section>
<h3 slot="header">Section</h3>
<ul slot="links">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
<rh-cta slot="cta">
<a href="#">Section CTA</a>
</rh-cta>
</rh-navigation-secondary-menu-section>
</rh-navigation-secondary-menu>
</rh-navigation-secondary-dropdown>
</li>
<li>
<rh-navigation-secondary-dropdown>
<a href="#dropdown-fallback-url" slot="link">Dropdown</a>
<rh-navigation-secondary-menu slot="menu">
<ul>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</rh-navigation-secondary-menu>
</rh-navigation-secondary-dropdown>
</li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
<rh-cta slot="cta">
<a href="#">Call to Action</a>
</rh-cta>
</rh-navigation-secondary>

<div id="space-holder">
<h2>Content Placeholder</h2>
<a href="#">Link placeholder</a>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc tincidunt luctus odio, vitae accumsan tortor sagittis et. Integer facilisis rutrum suscipit. Morbi elementum purus vel varius tincidunt. Nulla fringilla lacus a nulla vehicula tincidunt. Praesent a turpis et elit laoreet ullamcorper et et metus. Praesent malesuada massa in tellus bibendum congue. Curabitur mollis purus et metus eleifend sagittis. Vivamus fringilla tincidunt sem id euismod. Maecenas a vestibulum nisl. Sed libero metus, ultrices in tortor facilisis, semper rhoncus nunc. Nullam ut diam et felis posuere lobortis vitae id leo. Sed hendrerit ex libero, a faucibus tellus maximus et. Aliquam erat volutpat. Phasellus vestibulum a lacus eget eleifend. Pellentesque ipsum nunc, scelerisque non neque id, bibendum vestibulum ante.</p>
<p>Maecenas venenatis sollicitudin leo, vitae tincidunt lectus dapibus vel. Integer quis sapien dui. Nulla sagittis dapibus suscipit. Pellentesque consequat dapibus lorem id feugiat. Fusce ornare sapien at lacus porta maximus. Praesent gravida faucibus tellus et lobortis. Praesent ullamcorper facilisis semper. Praesent lobortis enim lacus, ut facilisis ex tristique in. Sed lobortis tortor ut sem lacinia pharetra. Nunc a varius risus. Proin volutpat eget justo quis fermentum. Nunc quis vestibulum ipsum. Donec vulputate laoreet sapien id mattis. Phasellus non enim laoreet, euismod mauris vel, vulputate est.</p>
<p>Vivamus porta massa at nulla eleifend, a pellentesque eros dictum. Nam finibus nibh purus, in placerat nulla elementum at. Integer quis est condimentum, tempor mi ac, dapibus ante. Pellentesque fringilla hendrerit est, ut ultricies orci condimentum viverra. Aliquam a lacus consequat dolor vestibulum euismod eget quis ipsum. Pellentesque viverra, libero sed euismod consectetur, turpis nulla tristique massa, vel ultricies massa arcu sit amet mauris. Donec aliquet tortor ante, ut pulvinar odio gravida et. Proin laoreet et elit at tempus. In aliquam erat lacus, in volutpat neque faucibus a.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc tincidunt luctus odio, vitae accumsan tortor sagittis et. Integer facilisis rutrum suscipit. Morbi elementum purus vel varius tincidunt. Nulla fringilla lacus a nulla vehicula tincidunt. Praesent a turpis et elit laoreet ullamcorper et et metus. Praesent malesuada massa in tellus bibendum congue. Curabitur mollis purus et metus eleifend sagittis. Vivamus fringilla tincidunt sem id euismod. Maecenas a vestibulum nisl. Sed libero metus, ultrices in tortor facilisis, semper rhoncus nunc. Nullam ut diam et felis posuere lobortis vitae id leo. Sed hendrerit ex libero, a faucibus tellus maximus et. Aliquam erat volutpat. Phasellus vestibulum a lacus eget eleifend. Pellentesque ipsum nunc, scelerisque non neque id, bibendum vestibulum ante.</p>
<p>Maecenas venenatis sollicitudin leo, vitae tincidunt lectus dapibus vel. Integer quis sapien dui. Nulla sagittis dapibus suscipit. Pellentesque consequat dapibus lorem id feugiat. Fusce ornare sapien at lacus porta maximus. Praesent gravida faucibus tellus et lobortis. Praesent ullamcorper facilisis semper. Praesent lobortis enim lacus, ut facilisis ex tristique in. Sed lobortis tortor ut sem lacinia pharetra. Nunc a varius risus. Proin volutpat eget justo quis fermentum. Nunc quis vestibulum ipsum. Donec vulputate laoreet sapien id mattis. Phasellus non enim laoreet, euismod mauris vel, vulputate est.</p>
<p>Vivamus porta massa at nulla eleifend, a pellentesque eros dictum. Nam finibus nibh purus, in placerat nulla elementum at. Integer quis est condimentum, tempor mi ac, dapibus ante. Pellentesque fringilla hendrerit est, ut ultricies orci condimentum viverra. Aliquam a lacus consequat dolor vestibulum euismod eget quis ipsum. Pellentesque viverra, libero sed euismod consectetur, turpis nulla tristique massa, vel ultricies massa arcu sit amet mauris. Donec aliquet tortor ante, ut pulvinar odio gravida et. Proin laoreet et elit at tempus. In aliquam erat lacus, in volutpat neque faucibus a.</p>
</div>

<link rel="stylesheet" href="../rh-navigation-secondary-lightdom.css">

<style>
/* fixes demo for overflow and display of sticky nav */
main {
display: contents;
}

[data-demo="rh-navigation-secondary"] {
padding: 0;
}

/* content space-holder that allows for overflow */
#space-holder {
min-height: 101vh;
padding: var(--_text-padding, var(--rh-space-lg, 16px));
}

@media screen and (min-width: 768px) {
#space-holder { --_text-padding: var(--rh-space-2xl, 32px); }
}

@media screen and (min-width: 1440px) {
#space-holder { --_text-padding: var(--rh-space-4xl, 64px); }
}
</style>

<script type="module">
import '@rhds/elements/rh-navigation-secondary/rh-navigation-secondary.js';
import '@rhds/elements/rh-cta/rh-cta.js';
</script>

Full screen demo

When to use

  • When you need to better organize a content structure
  • When you need to provide a more granular navigation that is specific to a topic
  • When you need to prevent other navigations from getting overloaded
Property Status Meaning
Figma library Ready Component is available in the Figma library
Responsive Ready Component responds to changing viewport sizes in Figma and the browser
RH Elements Ready Component is available as a web component
webRH Ready Component is available as a web component
© 2021-2024 Red Hat, Inc. Deploys by Netlify