- Implementation
Common Examples
Grouping side nav items
Side nav items can be grouped in two different ways, usingSideNav.Group or SideNav.Collapsible.Using SideNav.Group
Use theSideNav.Group component to group multiple links.Using SideNav.Collapsible
To make groups of items collapsible, use theSideNav.Collapsible component.Routing with Side Nav Links
As of version1.16.9, the pathname prop of the SideNav.Link component enables native browser routing using the history.pushState() function. This is essentially what react-router-dom does, and this method prevents extra dependencies in the @servicetitan/anvil2 package.React Accessibility
Multiple Navigation Landmark
When there is more than one navigation landmark on a page, each should have a unique label. For example, if aSideNav exists on the same page as another navigational element, such as an app bar using a nav element, they should both have unique labels.Reference: W3 Navigation LandmarkFor more guidance on semantic page structure and navigation landmarks, see semantic markup best practices.