An official website of the United States government
Here’s how you know
Official websites use .gov A
.gov website belongs to an official government
organization in the United States.
Secure .gov websites use HTTPS A
lock (
) or https:// means you’ve safely connected to
the .gov website. Share sensitive information only on official,
secure websites.
Hierarchical, vertical navigation to place at the side of a page.
Passed WCAG 2.1 AA
Guidance
When to use the side navigation component
To display a navigational hierarchy with one to three levels.
To display the “sub-navigation” within a section of the website.
When to consider something else
Small site. If the site has fewer than five pages, consider organizing the page without a navigational hierarchy.
Existing navigation. If your page already has a horizontal and vertical navigation bar, consider ways to simplify your navigation system.
Usability guidance
Show the current page. Indicate where a user is within the navigational hierarchy. Use the “active” state to show users which page they have navigated to.
Keep the navigation links short. They can be shorter derivatives of page titles themselves.
Always test your navigation. If the navigation hierarchy is too long, users may miss items at the bottom. If it’s too deep, users may miss items that require too many clicks. Usability test to find the right balance between breadth and depth.
Accessibility guidance
Test the side navigation component in your own project.
USWDS tested the side navigation component for accessibility. You should test your implementation, too.
Added a new fallback setting for sidenavs in Documentation template.
The new setting $theme-sidenav-reorder reorders the sidenav with CSS. Users should follow new markup recommendation in Documentation template’s code example to avoid accessibility issues.
More information:
uswds#5809
Breaking
Added type="button" to all non-form buttons to prevent default submit behaviors.
This allowed us to remove preventDefault() from the relevant component JavaScript.
More information:
uswds#4695
Fixed color of active parents in side navigation.
Fixed a regression where parent items in usa-sidenav no longer receive primary color.
More information:
uswds#4163