Components / Navigation / Side nav

N1 · Navigation

Side nav

Grouped destinations with a new chip, a lock, and a number-key hint.

When to use

  • A product has several destinations that cluster into groups.
  • People switch sections often enough to remember a digit.

When not to use

  • The page has fewer than five destinations.
  • The only task is a single form.

Usage

<nav class="c-sidenav" aria-label="Example sections">
  <p class="label">Register</p>
  <button type="button" class="c-navitem on" data-nav="inbox" data-key="1" aria-current="page"><span>Inbox</span><span class="c-meta"><span class="chip">New</span><kbd>1</kbd></span></button>
  <button type="button" class="c-navitem is-locked" data-nav="holds" data-key="3" aria-disabled="true"><span>Holds</span><span class="c-meta"><span class="c-lock">Locked</span><kbd>3</kbd></span></button>
</nav>

Variants

Locked item

Props

NameTypeDefaultDescription
data-navid—Destination id handled by the router.
data-key1–7—Digit hint shown on the item.
class onclassabsentSelected item. Pair with aria-current=page.
class is-lockedclassabsentItem stays in the list and does not select.
chip NewelementabsentMarks a destination that is new in this example.

Keyboard

KeyAction
1–7Selects the matching item. Locked digits do nothing.
TabMoves through the items.

Accessibility

Motion

Pattern origin

Pattern type: grouped sidebar with shortcut digits.

Related

Number-key routerStatus pillLocked item