NS Design System
v3.0.0 · 257 tokens

62Drawer

An edge-anchored

— same trap, Esc and top layer as Modal. Mobile navigation and the docs sidebar below lg live here.

Use it for

  • Mobile nav, filter panels, secondary detail

Not for

  • Blocking decisions — Modal, centered

Live demo

Menu
markup
<div>
<button class="ns-btn ns-btn--outline" data-open><i class="ph ph-list" aria-hidden="true"></i> Open drawer</button>
<dialog class="ns-drawer ns-drawer--start" aria-label="Menu">
  <div class="ns-drawer__header">
    <strong>Menu</strong>
    <button type="button" class="ns-btn ns-btn--quiet ns-btn--icon ns-btn--sm" style="margin-inline-start:auto" aria-label="Close menu" data-close>
      <i class="ph ph-x" aria-hidden="true"></i></button>
  </div>
  <div class="ns-drawer__body">
    <a class="ns-menu__item" href="#">Courses</a>
    <a class="ns-menu__item" href="#">Training</a>
    <a class="ns-menu__item" href="#">Docs</a>
  </div>
</dialog>
</div>

Accessibility contract

  • Identical dialog semantics to Modal — nothing extra to wire