Skip to main content Home About the Design SystemRoadmap OverviewDesignersDevelopers OverviewColorGridIconographyInteractionsSpacingTypography Overview Global colorBox shadowTypographyBorderOpacitySpaceLengthIconBreakpointsMedia queries All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button group Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Menu dropdown Navigation link Navigation (primary) Navigation (secondary) Navigation (vertical) Pagination PopoverPlanned Progress stepper Readtime Scheme toggle Select Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed OverviewColor PalettesCustomizingDevelopers All PatternsAccordionAlertCall to ActionCardFilterFormStacked navigationLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile AI design principlesLegal requirementsTransparency noticesIconographyColorChatbot avatarsAnimation All Personalization PatternsAnnouncement FundamentalsColorAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers Design/code status Release notes Get support

Stacked navigation

OverviewExamples
OverviewWhen to useHow it worksOverviewWhen to useHow it works

Overview

A full-width navigation stack combining <rh-navigation-primary> and <rh-navigation-secondary>. The primary navigation provides global site links and dropdown menus. The secondary navigation sits below it with product-specific links and becomes sticky as the user scrolls.

When to use

  • Web properties that need both a primary navigation bar and a product-level navigation bar
  • Pages where the secondary navigation should remain accessible while scrolling
  • Layouts that require z-index coordination between stacked sticky elements

How it works

The secondary nav uses position: sticky to pin itself to the top of the viewport on scroll. A CSS scroll-state(stuck: top) container query detects when the secondary has stuck and lowers the primary navigation's z-index, preventing its dropdown panels from overlapping the sticky secondary.

For browsers without scroll-state() support, an IntersectionObserver watches a sentinel element between the two navigations and toggles the same --rh-navigation-primary-z-index custom property.

<rh-navigation-primary role="navigation">
  <!-- global nav items -->
</rh-navigation-primary>

<rh-navigation-secondary>
  <a href="#" slot="logo">Product Name</a>
  <ul slot="nav">
    <li><a href="#">Link</a></li>
  </ul>
</rh-navigation-secondary>
© 2026 Red Hat Deploys by Netlify