Side navigation
About this component
Side navigation is a list of links to other parts of the same web page or to other pages. It sits alongside the page content. Side navigation can be a flat or nested list of links.
Side navigation highlights the page in the list that the user is on. Each link should take the user to distinct content.
If side navigation has a structure with nested sections, it should:
- display all the pages in a section when a user selects the section
- stay under 10 sections
- have no more than 3 levels in total
The side navigation should also:
- not repeat or be combined with grid navigation pages
- not include icons
- include a limited character count for links to avoid spanning over too many lines
The mobile version of side navigation is an expandable list at the top of the page.
Why we use this component
Side navigation helps users move between pages in a section of a website. It also shows users at a glance where they are in a section of a website.
Since it’s on the left hand side of the page, it also supports left to right reading.
Website analytics
To understand user behaviour, you can track clicks on side navigation items through the original page path, the click URL, the click text and a data attribute showing the item.
You can track click on the mobile version’s open/close toggle using a data attribute.
The Design System’s ‘tracking’ script adds the data attributes.
Accessibility
Aria attributes describe whether a link is currently selected and if the side navigation is open or closed.
Feedback, help and support
If you need help or support you can e-mail us at designsystem@gov.scot
There is a problem
Thanks for your feedback