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 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-overlayImportingUsagerh-navigation-secondaryrh-navigation-secondary-dropdownrh-navigation-secondary-menu-sectionrh-navigation-secondary-menurh-navigation-secondary-overlay

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

<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

Persistent wayfinding navigation for linking related pages below <rh-navigation-primary>. Provides role="navigation" with a configurable aria-label and light/dark color palettes. On mobile, items collapse behind a menu button. Keyboard navigation with Tab, Escape, Enter/Space. Should contain logo, nav (<ul>), and optional cta slots. Avoid using more then 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
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
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

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

Navigation container stacking order

102

Design Tokens 16

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

Navigation dropdown chevron color

Navigation menu toggle color

Full CSS Variable Permalink to this token
--rh-color-brand-red

Navigation current active item border color

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

Navigation bar surface in light mode

Tertiary surface (light theme)

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

Navigation bar surface in dark mode

Tertiary surface (dark theme)

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

Navigation bar bottom border width

1px border width; Example: Secondary CTA or Button

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

Navigation menu toggle typeface

Body text font family

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

Navigation menu toggle text size

16px font size

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

Navigation menu toggle top border width

3px border width: Example: Expanded Accordion panel

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

Navigation bar column gap

Navigation menu expanded inline-end padding

Navigation menu expanded inline-start padding

Navigation menu toggle inner spacing

Navigation menu toggle inline-end margin

16px spacer

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

Navigation menu toggle content gap

8px spacer

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

Navigation menu toggle 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 menu toggle top accent color

Navigation menu toggle 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 menu expanded top padding

Navigation menu toggle inline-end margin at viewport >= md

Navigation menu expanded top padding at viewport >= md

Navigation menu expanded inline padding at viewport >= md

Navigation call to action inner spacing at viewport >= md

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

CSS Custom Properties 0

None

Design Tokens 10

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

Navigation dropdown leading border width

3px border width: Example: Expanded Accordion panel

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

Navigation dropdown trailing border width

1px border width; Example: Secondary CTA or Button

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

Navigation dropdown trailing border color

Subtle border color (light theme)

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

Navigation dropdown elevation shadow

Small box shadow

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

Navigation dropdown chevron color

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 dropdown link slot background

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

Navigation dropdown leading border color

Navigation dropdown expanded block-start accent color at viewport >= lg

Brand text color for light theme

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

Navigation dropdown expanded background at viewport >= lg

Primary surface (light theme)

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

Navigation dropdown expanded chevron color at viewport >= lg

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

CSS Custom Properties 0

None

Design Tokens 3

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

Navigation menu section typeface

Heading font family

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

Navigation menu section slotted list content gap

16px font size

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

Menu section CTA top spacing

Menu section CTA block spacing

24px spacer

Full CSS Variable Permalink to this token

rh-navigation-secondary-menu

Expandable dropdown menu panel for secondary navigation. Provides full-width (default) and fixed-width layouts with content organized in a CSS grid. Must be placed inside the menu slot of an <rh-navigation-secondary-dropdown>. Tab navigates through menu content; Escape closes the menu. Screen readers access content via section headings and aria-labelledby associations.

Slots 1

Slot Name Summary Description
[default]

menu content

Should contain <rh-navigation-secondary-menu-section> elements with headings. Screen readers navigate sections via aria-labelledby associations between headings and link lists.
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

Menu section grid gap override

var(--rh-space-2xl, 32px)
--rh-navigation-secondary-menu-content-max-width

Navigation maximum width at viewport >= lg

1136px

Design Tokens 8

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

Navigation menu dropdown text color

Primary text color for light theme

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

Navigation menu dropdown background

Primary surface (light theme)

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

Navigation menu sections inner spacing

24px spacer

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

Navigation menu slotted list content gap

16px font size

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

Navigation menu elevation shadow at viewport >= lg

Small box shadow

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

Menu section grid gap

Navigation menu inline padding at viewport >= lg

Navigation menu inline padding at viewport >= xl

32px spacer

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

Navigation menu block-end padding at viewport >= lg

Navigation menu block padding at viewport >= xl

Navigation menu block padding at viewport >= 2xl

48px spacer

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

Navigation menu block-start padding at viewport >= lg

Navigation menu inline padding at viewport >= 2xl

64px spacer

Full CSS Variable Permalink to this token

rh-navigation-secondary-overlay

Semi-transparent backdrop for dimming page content when a secondary navigation dropdown or mobile menu is expanded. Provides a click target that allows users to close 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

When true, displays the overlay. Managed automatically by the parent <rh-navigation-secondary> when dropdowns or the mobile menu expand. Defaults to false.

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

Overlay stacking order

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

Overlay background base color

Secondary surface (dark theme)

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

Overlay background base color

Overlay background opacity

80% opacity

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