Navigation (secondary)

The Secondary navigation is used to connect a series of pages together. It displays wayfinding content and links relevant to the page it is placed on. It should be used in conjunction with the Primary navigation.

Secondary navigation component sample

View a live version of this component to see how it can be customized.

View this component in action

Introduction to zones

The secondary navigation is divided into three zones where content can be placed. Each zone may include custom content and elements in certain zones will collapse or become hidden completely as breakpoints get smaller. It is not required to use all three zones.

  • Zone 1 - Includes primary elements that are representative of the experience or series of pages
  • Zone 2 - Includes navigation elements like menus and links
  • Zone 3 - Includes secondary elements that provide additional actions

Helpful tip
Content in Zone 1 should be linked and direct visitors to the main page of the experience when selected.

Secondary navigation - introduction to zones

Zones on small breakpoints

On small breakpoints, navigation elements in Zone 2 will collapse into an accordion within a menu. Content in Zone 3 will either be positioned below the accordion or be hidden completely.

Secondary navigation - introduction to zones (small breakpoints)

Themes

The secondary navigation is used on a variety of pages so it requires a variety of themes. The goal for the secondary navigation is to blend in with its surroundings in order to avoid clashing or competing with other important components.

Choosing a theme

When thinking about choosing a theme, consider the goal of the page as well as what the design is or will be. Ideally, the chosen theme matches the rest of the page design while providing a seamless browsing experience.

Theme options

The light theme features a light gray background and a drop shadow, it is best used on pages with a lighter look and feel. The drop shadow is always visible unless covered by an expandable tray.

Secondary navigation - light theme option

The dark theme features a dark gray background and a thin gray line, it is best used on pages with a darker look and feel. The thin gray line is always visible unless covered by an expandable tray.

Secondary navigation - dark theme option

Product name text styling

If the secondary navigation is used to connect product-like pages, Zone 1 should display the product name in the form of linked text instead of the logo.

Warning
Various styling treatments were explored for the product name text, do not deviate from any of these styles.

Secondary navigation - product name text styling
Breakpoint Style
Large breakpoints Red Hat Display, Medium / 18px, 27 (1.5 line height)
Small breakpoints Red Hat Display, Medium / 16px, 24 (1.5 line height)

Navigation text styles have the same styling across all themes like font family, size, and line height. However, the color will change between black and white depending on the chosen theme.

Secondary navigation - navigation text styles

Expandable tray

If content in Zone 2 includes a menu and when that menu text is selected, an expandable tray will appear. It is divided into three parts and is styled the same across all themes.

  1. Tab - Visually indicates what menu is expanded
  2. Tray - The area where content or other components can be placed
  3. Overlay - A transparent background that helps elevate the component above the page underneath

Helpful tip
When a menu is expanded, the arrow icon next to the menu text will flip to point up.

Secondary navigation - expandable tray (desktop)
Secondary navigation - expandable tray (mobile)

Layout

The secondary navigation spans the entire width of the browser window on all breakpoints.

Secondary navigation - layout (desktop)
Secondary navigation - layout (mobile)

Left-to-right languages

When content is translated to other left-to-right languages, the layout and text size remains the same.

Secondary navigation - left-to-right languages

Right-to-left languages

When content is translated to a right-to-left language like Hebrew, the text size will increase which makes it easier to understand visual subtleties of unique characters.

Secondary navigation - right-to-left languages

Secondary navigation

The Secondary navigation is used to connect a series of pages together. It should be used as a supporting navigation component and not on its own.

Helpful tip
Websites that require only one navigation should use the primary navigation.

Secondary navigation - usage

Product name text stacking

If the secondary navigation is used to connect product-like pages, Zone 1 should display the product name in the form of linked text. If this text is short enough and there are fewer menus and links, it can remain on one line.

Warning
Do not truncate product name text or break it to three lines except in extreme cases on small breakpoints.

Secondary navigation - product name text stacking (one line)

Product name text should break to two lines where it makes sense, otherwise more space will be occupied than necessary.

Secondary navigation - product name text stacking (two lines)

In some rare cases, if product name text is extremely long, it will naturally break to three lines on small breakpoints.

Secondary navigation - product name text stacking (three lines)

This extremely small breakpoint example is 320px

Use Zone 2 to place navigation elements like menus and links. Typically, they are positioned on the left side next to Zone 1. The specific order of menus and links is up to content strategists.

Secondary navigation - navigation slots

Writing navigation content

Navigation elements provide options for visitors to browse through relevant content. Be aware of the following when writing content for Zone 2:

  • At least one menu or link should be included
  • A maximum of five menus and links can be included if the text is short
  • It is best to write all text as short as possible
  • If product name text or a call to action is included, they can sometimes have lots of characters
  • If a call to action is included, it will not stack to make room for more text
  • Text will more than likely expand when translated to other languages

Warning
Featuring too many menus and links can lead to visual crowding and choice paralysis for visitors.

Secondary navigation - navigation content
Element Maximum slots Maximum characters
Product name text 1 N/A
Menus and links 5 25*
Call to action 1 20

* If there are fewer menus and links in Zone 2, more characters can be written; if there are more menus and links, fewer characters can be written

Expandable tray

Use the expandable tray to organize content in two, three, or four columns. Positioning a call to action under a column of text will ensure that both elements will remain in the same arrangement when stacked on small breakpoints.

Warning
Do not use more than four columns in the expandable tray, consider reducing the amount of content instead.

Secondary navigation - expandable tray (four columns)

If content is organized in fewer than four columns, the containers will stretch to fill the empty space.

Secondary navigation - expandable tray (three columns)
Secondary navigation - expandable tray (two columns)

Writing expandable tray content

The expandable tray allows visitors to see a larger amount of relevant content. Elements that may be used include text, links, calls to action, and horizontal rules. Be aware of the following when writing content for the expandable tray:

  • It is best to write all text as short as possible
  • Do not stack lots of links in the same column
  • Do not use too many different call to action variants
  • Text will more than likely expand when translated to other languages
  • All text will stack on small breakpoints, so content positioned towards the left will be on top

Warning
Featuring too much content can lead to choice paralysis and visitors not seeing key information because they have to scroll.

Secondary navigation - expandable tray content (desktop)
Secondary navigation - expandable tray content (mobile)

Current page indicator

When a visitor is viewing a page that is part of the secondary navigation IA, a red bar will appear above the corresponding menu or link. External links will not display the top red bar (except on hover) because they direct visitors to a new tab or window when selected.

Secondary navigation - current page indicator

Scrolling with primary navigation

When the secondary navigation is used in conjunction with the primary navigation, it is positioned underneath. When a visitor scrolls down, the primary navigation will disappear and the secondary navigation will remain sticky.

Secondary navigation - scrolling with primary navigation (down)

When a visitor scrolls to the top of the page, the secondary navigation will reset underneath the primary navigation.

Secondary navigation - scrolling with primary navigation (up)

Scrolling with expandable tray

If the height of the expandable tray is shorter than the viewport, content will scroll underneath.

Secondary navigation - scrolling with expandable tray

If the height of the expandable tray is taller than the viewport, the tray will scroll instead.

Secondary navigation - scrolling with expandable tray

Only one expandable tray can be expanded at a time and there is no animation when navigating from one tray to the next.

Secondary navigation - navigating between trays

Collapsing the expandable tray

Clicking or tapping anywhere outside of the expandable tray should collapse it. Pressing the esc key should collapse the expandable tray as well.

Secondary navigation - collapsing the expandable tray

Additional behaviors

Keep in mind the following additional behaviors:

  • The expandable tray should not collapse or expand without user input by mouse or keyboard
  • Scrolling while the expandable tray is visible should not close the tray

Default

Secondary navigation - default interaction state
State Element Styling
Default (light theme) Product name text RH Display, Medium / 18px, 27 (1.5) / #151515
Default (light theme) Menu/link text and icons RH Text, Regular / 16px, 24 (1.5) / #151515
Default (dark theme) Product name text RH Display, Medium / 18px, 27 (1.5) / #fff
Default (dark theme) Menu/link text and icons RH Text, Regular / 16px, 24 (1.5) / #fff
Default (all themes) Call to action text See the Call to action page for specs

Hover

Secondary navigation - hover interaction state
State Element Styling
Hover (light theme) Product name text #6a6e73
Hover (dark theme) Product name text #d2d2d2
Hover (all themes) Menu and link top bar #e00 / 3px thickness
Hover (all themes) Call to action text See the Call to action page for specs

Focus

Secondary navigation - focus interaction state

Helpful tip
The focus state carries over styles from the hover state and also adds a focus indicator.

State Element Styling
Focus (light theme) Zone 1 #6a6e73, dashed, 1px border width
Focus (light theme) Zone 2 #151515, dashed, 1px border width
Focus (dark theme) Zone 1 #d2d2d2, dashed, 1px border width
Focus (dark theme) Zone 2 #fff, dashed, 1px border width
Focus (all themes) Zone 3 (call to action) See the Call to action page for specs

Active

Secondary navigation - active interaction state
State Element Styling
Active (all themes) Tab top bar #e00 / 3px thickness
Active (all themes) Tab background #fff
Active (all themes) Menu text and icon RH Text, Regular / 16px, 24 (1.5) / #151515

Tab order

A logical focus order helps visitors understand and operate Red Hat web properties. Elements need to receive focus in an order that preserves meaning, therefore the focus order should make sense and not jump around randomly.

Secondary navigation - accessibility tab order

Keyboard events

Action Event
Tab Moves the focus forward or to the right
Shift + Tab Moves the focus backwards or to the left
Enter or Return Expands or collapses the expandable tray or selects a link
Esc Collapses the expandable tray

Click or tap events

Action Location Event
Click or tap Anywhere outside of expandable tray Collapses expandable tray

Large breakpoints

The secondary navigation includes Zones 1, 2, and 3 on large breakpoints. The content in the expandable tray is also visible.

Secondary navigation - large breakpoints

Small breakpoints

Navigation elements in Zone 2 will collapse into an accordion within a menu. Content in Zone 3 will either be positioned below the accordion or be hidden completely.

Secondary navigation - small breakpoints

Incorrect ordering

Do not position the secondary navigation above the primary navigation.

Secondary navigation - best practice 1

Theme mismatch

Do not use the dark theme secondary navigation in environments with light elements and vice versa.

Secondary navigation - best practice 2

Content overload

Do not place too many navigation elements in Zone 2.

Secondary navigation - best practice 3

Adding or removing zones

Do not add more zones than provided.

Secondary navigation - best practice 4

Product name text on three lines

Do not allow product name text to break to three lines on large breakpoints.

Secondary navigation - best practice 5

The secondary navigation uses spacers to define space values between elements.

Extra large breakpoints

Secondary navigation - spacing (extra large breakpoints)

Large breakpoints

Secondary navigation - spacing (large breakpoints)

Small breakpoints

Secondary navigation - spacing (small)

To give feedback about anything on this page, contact us.

To learn how to use our other components in your designs, visit the Components section.