Style

A secondary navigation is a group of links and menus placed in a bar container that spans the width of the browser window.

Anatomy

A secondary navigation is divided into three slots, it is not required to use all three slots.

  • Slot 1 - includes primary elements like product logo text
  • Slot 2 - includes secondary elements like links and menus
  • Slot 3 - includes tertiary elements like a call to action (optional)
Image of a gray secondary navigation background with dotted line boxes that say slot 1, slot 2, and slot 3 from left to right

Using slots

Slots are defined areas where content can be inserted, each slot includes a specific type of content.

Slot number Use case
Slot 1 Includes a linked logo or text that directs users to a main page or home page
Slot 2 Includes navigation elements like inline links, menus, and external links
Slot 3 May include interactive elements like a call to action

Slots and breakpoints

On small breakpoints, navigation elements in Slot 2 will collapse into an accordion within a menu. Optional elements in Slot 3 will be placed below the accordion or hidden completely.

Image of four secondary navigations; two large ones and two small ones with dotted line boxes around each slot and labels that say slot 1, slot 2, and slot 3

Using the expandable menu

The expandable menu is an area where content can be placed like text, links, calls to action, and more. The menu requires a backdrop so it can separate itself from the page underneath, this helps users focus on the menu content.

Theme

A secondary navigation is available in both light and dark themes. The light theme background includes a box shadow whereas the dark theme background includes a gray bottom border.

Light theme

The light theme secondary navigation should be used in environments with a lighter look and feel. The box shadow is always visible unless covered by an expanded menu.

Image of a light theme secondary navigation

Dark theme

The dark theme secondary navigation should be used in environments with a darker look and feel. The gray bottom border is always visible unless covered by an expanded menu.

Image of a dark theme secondary navigation

Configuration

A secondary navigation spans the entire width of a browser window on all breakpoints. It has a fixed height of 86px on large breakpoints and a fixed height of 80px on small breakpoints even if Slot 1 text is only one line. Content in all slots is horizontally centered with the background.

Image of a secondary navigation construction; several examples showing details like spacing, alignment, height, width, and more

Expandable menu styles

An expandable menu includes content like text, links, calls to action, and more. The menu tab, panel, and backdrop have the same styles on all breakpoints.

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

Slot text labels

Slot 1 and Slot 2 text elements have specific styles applied to them.

Helpful Tip

Slot 3 usually includes a Call to action. To see Call to action styles, visit the Call to action page.

Image of four stacked secondary navigations; two are light theme and two are dark theme, both with dotted line boxes and labels that say slot 1 and slot 2

Space

The amount of space in a secondary navigation remains about the same on all breakpoints.

Large breakpoints

Image of secondary navigation spacing values on large breakpoints

Small breakpoints

Image of secondary navigation spacing values on small breakpoints
Example Token Description
8 --rh-space-md 8px spacer
16 --rh-space-lg 16px spacer
32 --rh-space-2xl 32px spacer

Interaction states

Interaction states are visual representations used to communicate the status of an element or pattern.

Hover

Image of light theme secondary navigation hover states
Image of dark theme secondary navigation hover states

Focus

Helpful Tip

The Focus state has the same styles as the Hover state.

Image of light theme secondary navigation focus states
Image of dark theme secondary navigation focus states

Active

Helpful Tip

The Active state has the same styles as the Hover state.

Image of light theme secondary navigation active states
Image of dark theme secondary navigation active states
© 2021-2024 Red Hat, Inc. Deploys by Netlify