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 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 Scheme toggle Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed OverviewColor PalettesCustomizingDevelopers All PatternsAccordionCall to ActionCardFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile All Personalization PatternsAnnouncement FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers Design/code status Release notes Get support

Navigation (secondary)

OverviewStyleGuidelinesCodeAccessibilityDemos
ImportingUsagerh-navigation-secondaryrh-navigation-secondary-dropdownrh-navigation-secondary-menu-sectionrh-navigation-secondary-menurh-navigation-secondary-overlayUsage guidelinesAccessibilityImportingUsagerh-navigation-secondaryrh-navigation-secondary-dropdownrh-navigation-secondary-menu-sectionrh-navigation-secondary-menurh-navigation-secondary-overlayUsage guidelinesAccessibility

Importing

Add rh-navigation-secondary to your page with this import statement:

<script type="module">
  import '@rhds/elements/rh-navigation-secondary/rh-navigation-secondary.js';
</script>
Copy to Clipboard Wrap 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-navigation-secondary/rh-navigation-secondary-lightdom.css">

Usage

<meta itemprop="description" content="Default secondary navigation demo with logo, nav links, dropdowns, and call to action.">
<rh-navigation-secondary>
  <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" href="#">Section CTA</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" href="#">Section CTA</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" href="#">Call to Action</rh-cta>
</rh-navigation-secondary>

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

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

System Integration

Current page indicator

When a user is viewing a page that is part of the secondary navigation information architecture, a red top border is visible. If the current active page is part of a dropdown menu, that dropdown is highlighted with the same top border to indicate it contains the current page. For more details on how to use this current page indicator, refer to the design guidelines for current page indicator.

To enable this indicator style, implementation should apply the aria-current="page" attribute to the current page link.

<a href="/" aria-current="page">Current page being viewed</a>

The rh-navigation-secondary element does not apply the aria-current="page" attribute itself. The responsibility for keeping track of which link is currently active falls on the content management system or application. The element checks for the presence of this attribute and applies the current page indicator style to nav links and dropdown menus when the active page is within a dropdown menu.

rh-navigation-secondary

Connects a series of related pages with persistent wayfinding navigation below the primary nav. Uses role="navigation" with a configurable aria-label. Supports light and dark color palettes. On mobile, nav items collapse behind a hamburger menu button. Keyboard: Tab moves between links/dropdowns, Escape closes expanded menus and mobile menu, Enter/Space toggles dropdown expansion. MUST be used with <rh-navigation-primary> above it. SHOULD contain a logo slot, nav slot with <ul>, and optional cta slot. AVOID more than 5 nav items.

Slots 4

Slot Name Summary Description

product logo or name link

Expects an <a> element with text, SVG, or image linking to the product homepage. Screen readers announce the link text or alt attribute. MUST be provided. aria-current="page" highlights when on the homepage.

mobile-menu

mobile menu button label

Text label for the mobile hamburger menu button. Defaults to "Menu". USE this slot for localization/translation of the button text. Screen readers announce this label with the button's expanded state.

nav

navigation link list

Expects a <ul> element containing <li> children with links or <rh-navigation-secondary-dropdown> elements. On mobile, hidden behind the menu button. AVOID more than 5 total items. Screen readers navigate via list semantics. Tab moves focus through each link or dropdown trigger.

cta

navigation-level call to action

Optional slot for an <rh-cta> element positioned at the end of the navigation bar. On mobile, appears below the nav list. Screen readers announce the CTA link text. AVOID long text that reduces nav item space.

Attributes 2

Attribute DOM Property Description Type Default
color-palette colorPalette

Controls the visual color palette of the navigation bar. Valid values: 'lighter' (default) for light environments, 'dark' for dark environments. Light-family values ('light', 'lightest') map to 'lighter'; dark-family values ('darker', 'darkest') map to 'dark'. SHOULD match the surrounding page color scheme. Defaults to 'lighter'.

'light' | 'lighter' | 'lightest' | 'dark' | 'darker' | 'darkest'
'lighter'
accessible-label accessibleLabel

Sets the aria-label on the internal <nav> element for screen readers. USE a descriptive label like the product name (e.g. "OpenShift navigation"). MUST be unique if multiple navigations exist on the page. Defaults to 'secondary'.

string
'secondary'

Methods 3

Method Name Description
firstUpdated()
open(index: number)

Opens a specific dropdown based on index. Closes all open dropdowns before opening specified. Toggles overlay to open

close()

Closes all open dropdowns

Events 1

Event Name Description
overlay-change

Fires when a dropdown opens/closes in desktop view or mobile menu toggles. Detail: open (boolean), toggle (HTMLElement).

CSS Shadow Parts 3

Part Name Summary Description
nav

main navigation wrapper element

The outermost container for the secondary navigation, wrapping all navigation content including logo, menu, and CTA. This part corresponds to a <div> element that provides the primary structure and styling for the navigation bar.

Styling:

  • Use this part to customize the overall navigation appearance
  • Applies compact mode styles when viewport is mobile-sized
  • Controls positioning and z-index of navigation elements

@see Navigation documentation

container

navigation content container

The primary container for navigation links, logo, mobile menu button, and CTA. This part corresponds to a <div> element that manages the layout and expansion states of the navigation content.

Styling:

  • Use this part to customize the navigation content layout
  • Controls expanded/collapsed states for mobile menu
  • Manages positioning of navigation items and dropdowns
  • Contains grid layout for organizing navigation elements

@see Navigation documentation

cta

call-to-action container

Container for the navigation-level call-to-action button. This part corresponds to a <div> element positioned at the end of the navigation bar.

Styling:

  • Use this part to customize the CTA positioning and spacing
  • Appears at the rightmost position in desktop view
  • Typically contains a single <rh-cta> element
  • Automatically adjusts color palette in mobile vs desktop views

@see Navigation documentation

CSS Custom Properties 1

CSS Property Description Default
--rh-navigation-secondary-z-index

--rh-navigation-secondary-z-index Controls the stacking order of the secondary navigation bar. Defaults to 102 to ensure navigation appears above most page content but below modals and overlays.

Usage guidelines:

  • Keep default value (102) for standard page layouts
  • Same z-index as primary navigation for consistent stacking
  • Increase only when navigation must appear above specific page elements
  • Coordinate with --rh-navigation-primary-z-index if using both navigations
  • Ensure navigation doesn't overlap modals (typically z-index 1000+)

z-index of the navigation-secondary

102

Design Tokens 17

Token Description Copy
--rh-color-text-primary
Full CSS Variable Permalink to this token
--rh-color-brand-red
Full CSS Variable Permalink to this token
--rh-color-border-subtle
Full CSS Variable Permalink to this token
--rh-color-surface-lighter

Tertiary surface (light theme)

Full CSS Variable Permalink to this token
--rh-color-surface-dark

Tertiary surface (dark theme)

Full CSS Variable Permalink to this token
--rh-border-width-sm

1px border width; Example: Secondary CTA or Button

Full CSS Variable Permalink to this token
--rh-font-family-body-text

Navigation typeface

Body text font family

Full CSS Variable Permalink to this token
--rh-font-size-body-text-md

Navigation text size

16px font size

Full CSS Variable Permalink to this token
--rh-border-width-lg

Navigation top border

3px border width: Example: Expanded Accordion panel

Full CSS Variable Permalink to this token
--rh-space-lg

Navigation content gap

Navigation inner spacing

Navigation end margin

16px spacer

Full CSS Variable Permalink to this token
--rh-space-md

Navigation content gap

8px spacer

Full CSS Variable Permalink to this token
--rh-color-surface

Navigation background

Full CSS Variable Permalink to this token
--rh-color-surface-lightest

Primary surface (light theme)

Full CSS Variable Permalink to this token
--rh-color-text-brand-on-light

Navigation top accent color

Navigation top accent color

Brand text color for light theme

Full CSS Variable Permalink to this token
--rh-color-text-primary-on-dark

Primary text color for dark theme

Full CSS Variable Permalink to this token
--rh-color-text-primary-on-light

Primary text color for light theme

Full CSS Variable Permalink to this token
--rh-space-2xl

Navigation end margin

Navigation inner spacing

32px spacer

Full CSS Variable Permalink to this token

rh-navigation-secondary-dropdown

Wraps a top-level nav link to add expandable dropdown menu functionality. Upgrades the slotted <a> with role="button", aria-expanded, and aria-controls for accessibility. Highlights with a red top border when the dropdown contains the current page (aria-current="page"). Keyboard: Enter/Space toggles the dropdown; Tab moves through menu items; Escape closes. MUST contain an <a> in the link slot and an <rh-navigation-secondary-menu> in the menu slot.

Slots 2

Slot Name Summary Description
link

dropdown trigger link

Expects an <a> element. Automatically upgraded with role="button", aria-expanded, and aria-controls for keyboard and screen reader accessibility. Enter/Space toggles the dropdown.

menu

dropdown menu panel

Expects an <rh-navigation-secondary-menu> element. Visibility is toggled when the link slot is activated. Screen readers can navigate menu sections via headings inside the menu.

Attributes 0

None

Methods 0

None

Events 1

Event Name Description
expand-request

Fires when the dropdown link is clicked. Detail: expanded (boolean), toggle (RhNavigationSecondaryDropdown).

CSS Shadow Parts 1

Part Name Summary Description
container

dropdown wrapper container

The container for a navigation dropdown item, wrapping both the link and menu. This part corresponds to a <div> element that manages the dropdown state and styling.

Styling:

  • Use this part to customize the dropdown appearance and layout
  • Applies .expanded class when dropdown is open
  • Applies .highlight class when dropdown contains the current page
  • Controls dropdown link and menu positioning

@see Navigation documentation

CSS Custom Properties 0

None

Design Tokens 10

Token Description Copy
--rh-border-width-lg

Navigation leading border

3px border width: Example: Expanded Accordion panel

Full CSS Variable Permalink to this token
--rh-border-width-sm

Navigation trailing border

1px border width; Example: Secondary CTA or Button

Full CSS Variable Permalink to this token
--rh-color-border-subtle-on-light

Navigation trailing border color

Subtle border color (light theme)

Full CSS Variable Permalink to this token
--rh-box-shadow-sm

Navigation elevation shadow

Small box shadow

Full CSS Variable Permalink to this token
--rh-color-text-primary
Full CSS Variable Permalink to this token
--rh-font-size-body-text-md

16px font size

Full CSS Variable Permalink to this token
--rh-color-surface

Navigation background

Full CSS Variable Permalink to this token
--rh-color-text-brand-on-light

Navigation leading border color

Navigation top accent color

Brand text color for light theme

Full CSS Variable Permalink to this token
--rh-color-surface-lightest

Navigation background

Primary surface (light theme)

Full CSS Variable Permalink to this token
--rh-color-text-primary-on-light

Primary text color for light theme

Full CSS Variable Permalink to this token

rh-navigation-secondary-menu-section

Groups related links under a heading within a dropdown menu. Automatically wires aria-labelledby between the slotted heading and adjacent <ul>/<ol> for screen reader navigation. Renders as a <section> element. MUST contain a heading in the header slot and a list in the links slot. SHOULD provide an id on the heading or one will be auto-generated. Tab navigates through links; the heading provides group context to assistive technology.

Slots 3

Slot Name Summary Description
header

section heading

Expects an <h1>-<h6> element. Auto-linked to the links list via aria-labelledby for screen reader group identification. An id is generated if not present.

links

section link list

Expects a <ul> or <ol> element with navigation links. Automatically receives aria-labelledby pointing to the header for screen readers. Tab navigates through each link in the list.

cta

section-level call to action

Optional slot for an <rh-cta> element. Appears after the link list. Screen readers announce the CTA link text in document order.

Attributes 0

None

Methods 0

None

Events 0

None

CSS Shadow Parts 1

Part Name Summary Description
container

menu section container

The semantic container for a menu section, grouping related navigation links under a common header. This part corresponds to a <section> element that provides structure and automatic accessibility enhancements.

Styling:

  • Use this part to customize individual menu section appearance
  • Controls spacing and layout of header, links, and CTA
  • Sections are organized in a grid when multiple sections exist
  • Automatically applies aria-labelledby to link lists

Accessibility:

  • Automatically associates heading with list using aria-labelledby
  • Generates IDs for headers if not present
  • Ensures semantic structure for screen reader users

@see Navigation documentation

CSS Custom Properties 0

None

Design Tokens 3

Token Description Copy
--rh-font-family-heading

Navigation typeface

Heading font family

Full CSS Variable Permalink to this token
--rh-font-size-body-text-md

Navigation content gap

16px font size

Full CSS Variable Permalink to this token
--rh-space-xl

Navigation inner spacing

Navigation inner spacing

24px spacer

Full CSS Variable Permalink to this token

rh-navigation-secondary-menu

The expandable dropdown menu panel for secondary navigation. Supports full-width (default) and fixed-width layouts. Contains <rh-navigation-secondary-menu-section> children organized in a CSS grid. Always renders on the lightest color palette. Visibility is toggled by the parent <rh-navigation-secondary-dropdown>. MUST be placed inside the menu slot of a dropdown. Tab navigates through menu content; Escape closes the menu. Screen readers access content via section headings.

Slots 1

Slot Name Summary Description
[default]

Optional <rh-navigation-secondary-menu-section> elements or content following design guidelines
Note: [default] unnamed slots do not have a slot="name" attribute.

Attributes 3

Attribute DOM Property Description Type Default
color-palette colorPalette

Color palette for the menu panel surface. SHOULD remain 'lightest' (default) as secondary nav menus always render on a light surface. Defaults to 'lightest'.

'light' | 'lighter' | 'lightest' | 'dark' | 'darker' | 'darkest'
'lightest'
layout layout

Controls the menu panel width. 'full-width' (default) spans the browser width with content in a responsive grid. 'fixed-width' constrains the panel to its content width, positioned below the trigger link. USE 'fixed-width' for simple menus with fewer sections. Defaults to 'full-width'.

'fixed-width' | 'full-width'
'full-width'
visible visible

Controls whether the menu panel is visible. Managed automatically by the parent <rh-navigation-secondary-dropdown>. When true, the menu is displayed; when false, it is hidden. AVOID setting directly. Defaults to false.

boolean
false

Methods 0

None

Events 0

None

CSS Shadow Parts 3

Part Name Summary Description
full-width

container - <div> element, wrapper for full-width menus

fixed-width

container - <div> element, wrapper for fixed-width menus

sections

container - <div> element, wrapper for menu sections

CSS Custom Properties 3

CSS Property Description Default
--rh-navigation-secondary-menu-section-grid repeat(auto-fit, minmax(15.5rem, 1fr))
--rh-navigation-secondary-menu-section-grid-gap var(--rh-space-2xl, 32px)
--rh-navigation-secondary-menu-content-max-width

Navigation maximum width

1136px

Design Tokens 8

Token Description Copy
--rh-color-text-primary-on-light

Navigation text color

Primary text color for light theme

Full CSS Variable Permalink to this token
--rh-color-surface-lightest

Navigation background

Primary surface (light theme)

Full CSS Variable Permalink to this token
--rh-space-xl

Navigation inner spacing

24px spacer

Full CSS Variable Permalink to this token
--rh-font-size-body-text-md

Navigation content gap

16px font size

Full CSS Variable Permalink to this token
--rh-box-shadow-sm

Navigation elevation shadow

Small box shadow

Full CSS Variable Permalink to this token
--rh-space-2xl

32px spacer

Full CSS Variable Permalink to this token
--rh-space-3xl

48px spacer

Full CSS Variable Permalink to this token
--rh-space-4xl

64px spacer

Full CSS Variable Permalink to this token

rh-navigation-secondary-overlay

Semi-transparent backdrop overlay that dims page content when a secondary navigation dropdown or mobile menu is expanded. Clicking the overlay closes all open menus. Managed automatically by <rh-navigation-secondary>. AVOID using standalone. Screen readers SHOULD ignore this element as it serves a purely visual purpose. Keyboard: Escape closes the overlay.

Slots 0

None

Attributes 1

Attribute DOM Property Description Type Default
open open

Controls the visibility of the navigation overlay.

When true, displays a semi-transparent overlay covering page content behind the secondary navigation. When false, the overlay is hidden.

Usage guidelines

  • Automatically managed by <rh-navigation-secondary> parent component
  • Displays when dropdowns are expanded in desktop view
  • Displays when mobile menu is open in mobile view
  • Clicking the overlay closes all open navigation menus

Accessibility

  • Provides visual focus on navigation by dimming page content
  • Prevents interaction with page content while navigation is active
  • Works with keyboard navigation (ESC key closes overlay)
  • Helps users understand the navigation modal context
boolean
false

Methods 0

None

Events 0

None

CSS Shadow Parts 0

None

CSS Custom Properties 1 1

CSS Property Description Default
--rh-navigation-secondary-overlay-z-index

z-index of the navigation-secondary-overlay

var(--rh-secondary-nav-overlay-z-index, -1)
CSS Property Description Default Reason
--rh-secondary-nav-overlay-z-index

-1

use --rh-navigation-secondary-overlay-z-index

Design Tokens 2

Token Description Copy
--rh-color-gray-90

Secondary surface (dark theme)

Full CSS Variable Permalink to this token
--rh-opacity-80

80% opacity

Full CSS Variable Permalink to this token
© 2026 Red Hat Deploys by Netlify