Site navigation

Site navigation appears at the top of every page on your site. It gives links to pages in the site, sometimes ordered by topic, task, or user type. This makes it easier for people to navigate the website.

There are two options for each site navigation item:

  • A link to a page
  • Text with a dropdown menu of links

State Web Template navigation types and variations include:

  • Single level menu
  • Dropdown menu
  • Megamenu
  • Icon menu

The site navigation component is made to switch between desktop and mobile presentations. On desktop, the top level links or text are arranged across the top of the page. On mobile, they are in a hamburger menu that people select to expand. The links in the hamburger menu are stacked.

Single level menu

This page is using the Single Level Navigation. This navigation style does not include a dropdown for sub navigation items.

Single level naviagiton

Dropdown menu is using the dropdown sub navigation.

Dropdown Naviagiton

Megamenu

The flex megamenu displays dropdown panels for sub navigation when the user clicks on a primary link.

Naviagiton with icons

Icon menu

Navigation with icons usually appears to the right of the site logo. It uses icons from CA.gov font library inside of the first level navigation items.

Naviagiton with icons

Usage

When and how to use it

Use site navigation to help people find pages on your website. It should list or lead to the most helpful content on your website.

Links can be organized into sections or can stand alone. Sections can be organized by:

  • Top tasks
  • Major topic areas
  • Audience or user groups

You can use a card sorting activity to determine what should go in and how to organize your site navigation.

How not to use it

Do not overload the site navigation with too many pages. And avoid using more than a handful of navigational items. This makes it difficult for people to find what they're looking for. Make sure any pages not in the site navigation can be reached through a page in the site navigation or the site footer.

Do not link to PDFs or external sites in the site navigation.

Accessibility

Standard accessibility review

Each time a new component version is published:

  • Test with the axe accessibility tool
  • Review with the VoiceOver or NVDA screen reader
  • Ensure all actionable elements are accessible by keyboard command and tab in a logical order
  • Check the component layout on a variety of screen sizes