Side navigation
Side navigation lists places down the left edge of the screen and marks the one you are in. It holds the blocks of a long page, or the workspaces and modules of WerkOS.
Page and product
On a long page, the list beside the content shows the page title and its blocks. It follows you down the page and marks the block you are reading.
In WerkOS, the rail on the far left switches workspaces. Expand it and the modules panel opens beside it, with the modules of that workspace in folders.
When to use it
Use the page list on a page with three or more blocks. A shorter page, or an overview that is itself a list of links, does without it.
Keep side navigation to two levels. A deeper hierarchy, such as the documents of one candidate, belongs inside the page, with a breadcrumb above it. Leave actions and filters out of the list, so it stays a map.
Name each row with the word people use for the place. Module names are proper names and keep their capitals, such as Global Projects. Everything else is in sentence case. A module a person has no access to is left out.
Anatomy
Rows sit on the same pitch in both uses. Only the rows of WerkOS carry an icon, one per module.
- Page list width
- Two of twelve columns
- --leftnav-w
- Row
- 36 px, text inset 16 px
- --space-4
- Sticky offset
- 24 px under the header
- --space-6
- Rail
- 84 px wide, 24 px radius
- --radius-3xl
- Rail tile
- 36 px icon box, 17 px glyph, 10 px label. A 32 px box on a short window
- Modules panel
- 232 px wide, pushes the content aside
- Folder title
- Bold, full ink, after a 14 px chevron
- Module row
- 36 px, 18 px glyph, 10 px gap, 8 px radius
- --radius-lg
Showing where you are
On a page, the current row gets a thin outline, which follows you as you scroll without a heavy fill jumping from row to row.
In WerkOS, the module you are in gets a soft blue fill, full ink and a heavier glyph. A module that is coming sits faded with the word Soon.
- Global ProjectsIdle
- Global ProjectsHover
- Global ProjectsCurrent
- Global ProjectsFocus
- Global ProjectsSoonComing soon
- Idle
- Muted ink
- --text-muted
- Hover on a page
- Fill, full ink
- --surface-control
- Hover in WerkOS
- Soft fill, the ink stays
- --glass-fill-hover
- Current on a page
- 1 px outline, full radius, full ink
- --text
- Current in WerkOS
- Soft blue fill, full ink, glyph stroke 2
- --nav-fill-active
- Coming soon
- The whole row at 60 percent, the word Soon
- Focus
- 2 px ring
- --focus-ring
Behavior
The page list marks the block whose heading last passed under the header. At the bottom of the page the last block is marked, even when it is too short to reach the top.
Choosing a row scrolls to its block and moves focus to its heading. The list scrolls on its own when it is taller than the window, and keeps the current row in view.
The first tile, Expand or Collapse, opens and closes the modules panel, which pushes the content aside. The panel and its folders remember their state. Long labels wrap on a page and end in an ellipsis in the panel.
Keyboard and screen readers
Each list is a navigation landmark with its own name: On this page, Main navigation for the rail, and Modules. The current link carries aria-current. A closed modules panel is inert, so Tab does not walk into links you cannot see.
- Tab
- Moves from link to link
- Enter
- Follows the link
- Enter or Space on a folder
- Opens or closes the folder
Permitted and not permitted
Permitted
A current item at each level
The rail and the panel both show where you are.
The word Soon after a module that is coming
It keeps its place, and it is not a link.
Not permitted
A third level of nesting
People lose track of where they are. Move the depth into the page.
Color alone for the current item
People who cannot tell hues apart lose their place.
A pill around the word Soon
The faded row already says it.