Top navigation
<gcds-top-nav>
Also called: site menu, navigation, navbar.
A top navigation is a horizontal list of page links.
-
GitHub -
Figma
Top navigation component preview
Top navigation anatomy – on desktop
- The home nav link identifies the site using text or a logo and it links to the home page. It uses a nav link that is added within the
home
slot. - The nav link is a link to a popular page or section on the site. Nav links can be in the top level if they're standalone.
- The nav group can be collapsed and expanded and generally contains a list of 2-5 links.
- The nav group label describes the category of links in that group. It acts as a button to expand and collapse the group of links.
- The nav group chevron icon points up when the nav group is collapsed and down when it's expanded.
- The nav link with active indicator gives visual prominence to the current page.
Design and accessibility for top navigation
Set the home nav link
The home nav link can be a shorter version of the full name.
For logos, include descriptive text.
Note: On mobile, the home nav link does not link to the homepage.
Choose meaningful nav link text
Make link text clear and specific to help a person decide if they should leave the current page. Spell out where a person will go or what they'll find when they select a link.
Keep link text short and distinctive so a person can scan the links and find what they're looking for.
Limit the number of links in your top navigation. Too much information increases cognitive load and can be overwhelming to some readers.
If using breadcrumbs, align the content hierarchy in both set of links, so both components reflect a similar path through the site.
Tip: Read top navigation link text aloud in sequence to note similarities in how link text sounds when read by an assistive device.
Add navigation groups to the top navigation
Opt to include a second level with a navigation group, sometimes called stairs or dropdowns, to the top navigation.
In the second level, limit the group to 7 links. Target 2-5 in each group.
Help us improve
Have questions? Something you'd change or you'd like to see? Share your feedback with us to help improve GC Design System.