Navigation (primary)
On this page
Guidelines
Use the primary navigation to organize high-level content and important user actions.
Primary vs. secondary navigation
Here is guidance on when to use the primary vs. secondary navigation.
Element | When to use |
---|---|
Primary navigation |
|
Secondary navigation |
|
Writing content
Menu text labels
Menus need to quickly describe to users what content they can expect to see when expanded. Try to write short and concise menu text labels.
Element and character counts
Element | Max number | Character count |
---|---|---|
Primary Menu | 6 | 20 |
Cross-domain link | 3 | 15 |
Utility menu | 3 | 10 |
Expandable menus
Users can expand and collapse any menu whenever they want. Every menu is collapsed by default and users are only able to expand one menu at a time.
Primary menus
Content in primary menus is organized using a 4-column grid within a fixed width container.
When using a card or tile, it should be arranged last.
Grid column width does not change if there are less than 4 columns of content.
Utility menus
Content in utility menus can have a flexible size and layout, but should not occupy more than 3 grid columns.
Behavior
Sticky scrolling
The primary navigation is always sticky on scroll on every page it is used on.
Expanding menus
Expanded menus are indicated by a Hybrid style gradient border. When users hover over another menu, there are subtle visual changes (see Interaction states). When another menu is selected, the caret icon rotates, and the previously expanded menu collapses. Only 1 menu can be expanded at a time.
Collapsing menus
Menus can be collapsed by doing the following.
- Selecting the same primary or utility menu again
- Selecting anywhere inside of the overlay
- Pressing the Escape key
Responsive design
Some elements collapse or disappear as the primary navigation gets smaller.
Viewport range | Result |
---|---|
<1920px | Utility menu text labels disappear |
<1680px | Cross-domain links disappear |
<1440px | Red Hat logo becomes the hat |
<1200px | Primary menus collapse into mega menu with accordion |
<992px | Mega menu text label disappears |
<576px | For you utility menu disappears |
Skip link
When users land on or refresh a page and then press the Tab key, the Skip link will appear on top of the primary navigation.
Best Practices
Content overload
Limit the amount of primary menus to 5 or 6 max and the number of utility menus to 3 max.
Do not overload the primary navigation with additional primary and utility menus.
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.