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

Subnavigation

OverviewStyleGuidelinesCodeAccessibilityDemos
OverviewStatusWhen to useStatus checklistOverviewStatusWhen to useStatus checklist

Overview

A subnavigation provides a horizontal list of links for navigating related pages. Authors should slot <rh-navigation-link> elements as children; authors should avoid slotting bare <a> elements, which are deprecated. Each link must have visible text content for accessibility. When more than one subnav appears on a page, authors should set accessible-label so screen readers can distinguish them.

Overflow scroll buttons appear when links exceed the available space. All links are keyboard accessible via Tab and Enter.

import '@rhds/elements/rh-subnav/rh-subnav.js';
<rh-subnav>
  <a href="#">Users</a>
  <a href="#">Containers</a>
  <a href="#">Databases</a>
  <a href="#" aria-current="page">Servers</a>
  <a href="#">System</a>
  <a href="#">Network</a>
  <a href="#">Cloud</a>
</rh-subnav>

<link rel="stylesheet" href="../rh-subnav-lightdom.css">
import { Subnav } from "@rhds/elements/react/rh-subnav/rh-subnav.js";

// NOTE: React 19+ does not require these wrapper imports.
// You can use the custom elements directly as-is.

export const Demo = () => (
  <Subnav>
    <a href="#">Users</a>
    <a href="#">Containers</a>
    <a href="#">Databases</a>
    <a href="#" aria-current="page">Servers</a>
    <a href="#">System</a>
    <a href="#">Network</a>
    <a href="#">Cloud</a>
  </Subnav>
  <link rel="stylesheet" href="../rh-subnav-lightdom.css" />
);

Sets color palette, which affects the element's styles as well as descendants' color theme. Overrides parent color context. Your theme will influence these colors so check there first if you are seeing inconsistencies. See CSS Custom Properties for default values

Customize the default aria-label on the <nav> container. Defaults to "subnavigation" if no attribute/property is set.

Label for the scroll back button

Label for the scroll forward button

View source on GitHub

Status

When to use

  • When you need to connect a group of related pages together
  • When you need to offer users a more granular navigation
  • When you want to allow users to browse high-level and low-level pages in the same experience
Image of a subnavigation; a horizontal row of links placed on a light gray bar

Status checklist

© 2026 Red Hat Deploys by Netlify