Skip to main content

Side Navigation

Hierarchical, vertical navigation to place at the side of a page.



One Level

Component Preview


Component Code

<nav aria-label="Side navigation"> <ul class="usa-sidenav"> <li class="usa-sidenav__item"> <a href="javascript:void(0);" class="usa-current">Current page</a> </li> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Parent link</a> </li> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Parent link</a> </li> </ul> </nav>


Two Levels (with Children)

Component Preview


Component Code

<nav aria-label="Side navigation"> <ul class="usa-sidenav"> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Parent link</a> </li> <li class="usa-sidenav__item"> <a href="javascript:void(0);" class="usa-current">Current page</a> <ul class="usa-sidenav__sublist"> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Child link</a> </li> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Child link</a> </li> <li class="usa-sidenav__item"> <a href="javascript:void(0);" class="usa-current">Child link</a> </li> </ul> </li> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Parent link</a> </li> </ul> </nav>


Three Levels (with Grandchildren)

Component Preview


Component Code

<nav aria-label="Side navigation"> <ul class="usa-sidenav"> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Parent link</a> </li> <li class="usa-sidenav__item"> <a href="javascript:void(0);" class="usa-current">Current page</a> <ul class="usa-sidenav__sublist"> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Child link</a> </li> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Child link</a> <ul class="usa-sidenav__sublist"> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Grandchild link</a> </li> <li class="usa-sidenav__item"> <a href="javascript:void(0);" class="usa-current">Grandchild link</a> </li> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Grandchild link</a> </li> </ul> </li> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Child link</a> </li> </ul> </li> <li class="usa-sidenav__item"> <a href="javascript:void(0);">Parent link</a> </li> </ul> </nav>



Guidance

When to use the side navigation component

Display a navigational hierarchy with one to three levels.
Side navigation supports up to three levels of nesting for hierarchical content.
Display "sub-navigation" within a section.
Use side navigation to show related pages within a section of your 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 usa-current class 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

Use unique aria-label values.
If you have multiple navigation components on a page, each should have a unique aria-label to help screen reader users distinguish between them.
Use proper nesting.
Use usa-sidenav__sublist for nested lists to maintain proper semantic structure.

USWDS Documentation

For more guidance, view the USWDS Side Navigation Component Documentation.




Settings

Variable Description
$theme-sidenav-current-border-width

Width of the current section indicator.

$theme-sidenav-font-family

Font family of the side navigation.

$theme-sidenav-reorder

Reorder Documentation template sidenav with CSS. Favor code example in Documentation template instead.




Variants

This component has no modifier class variants. Hierarchy is achieved through nested usa-sidenav__sublist elements.

Looking for U.S. government information and services?
Visit USA.gov