Side Navigation

The vertical rail for product areas, with grouping and collapse.

v1.0.0·Updated Jul 9, 2026 · 12:00
Live Demo — Fully Interactive
The full rail — toggle the active indicator bar
Configuration
State
Variant
Icons
Logo
<SideNav />
Behavior — The Engineering Contract
PropTypeNotes
collapsed / onCollapseboolean / (v) => voidToggles the 236 ↔ 64px rail
variantrounded · square · floatingRounded card, flush edge, or a lifted floating rail
icons / logobooleanShow or hide item icons and the brand lockup
Item.childrenItem[]Nested tree items that expand in place
Item.icon / activeReactNode / booleanGlyph and current-page state
Item.badgenumberCount pill, hidden when collapsed
Section.labelstringMono group heading
collapsed tooltipsLabels surface on hover of icon items

The rail carries persistent product areas. For global actions and account use the Top Navigation; for a jump-anywhere search use the Command Menu.

Anatomy
1Section labelMono heading grouping items.
2ItemIcon + label; active gets a warm bar.
3BadgeOptional count, hidden when collapsed.
Do's and Don'ts
✓ Do

Keep one active item, marked with the warm inset bar.

✕ Don't

Don't highlight two items. Only the current area is active.

✓ Do

When collapsed, keep icons and surface labels on hover.

✕ Don't

Don't list a dozen flat items. Group them under sections.

In context: Examples
A · App shell

The rail plus a content region — the classic app shell.

B · Collapsed

Icons-only on smaller screens or to reclaim width.

C · Sectioned

Section labels split large products into areas.

Measurements & Tokens
TokenValueRole
--snav-w236pxExpanded rail width
--snav-w-collapsed64pxIcons-only width
--snav-ease.24sCollapse transition
--snav-active2px #FF7A00 insetCurrent-item marker
--snav-item#9AA0A8Idle item colour
--snav-labelmono · #565A62Section heading
Code
<nav class="o-snav" aria-label="Primary">
  <div class="o-snav__brand"><Logo /> Optimistic</div>
  <div class="o-snav__label">Workspace</div>
  <a class="o-snav__item is-active" aria-current="page"><HomeIcon /> Overview</a>
  <a class="o-snav__item"><GridIcon /> Projects <span class="o-badge">3</span></a>
</nav>