Skip to content
OAIT Design System

Design system / Components

Navigation drawer

The navigation of consoles: a 272px column of grouped places from 768px, and the same list in a modal side sheet behind a "Menu" row below 768px.

When to use

  • In consoles and admin areas with more than five places, or places that fall into groups: Global ID's admin console (Directory, Events, Places and scans, and Platform), Tamakkan's crew area, the Games organizer console (D-CSN-13, D-LAY-09).
  • From 768px it is the console shell's first column; below 768px a full-width "Menu" row under the top app bar opens it as a modal side sheet from the inline start.

When not to use

Anatomy

  1. Container: <nav class="oa-nav-drawer" aria-label="Admin console">, with no background of its own in the console shell, where the shell's surface-container shows (D-CSN-58), 12px padding; it fills its column (272px) or its sheet.
  2. Group (__group): a heading button and its list.
  3. Group button (__group-btn): a 48px disclosure button with the group's name (__group-label) and an expand_more chevron (__chevron) at the inline end.
  4. List (__list): a ul of places, named by its group; [hidden] while the group is closed. The first list has no group: it holds "Overview" (dashboard), the console's first destination (D-CSN-58).
    • A place may carry a count: a badge after the label, hidden from screen readers, followed by the count in words ("Photos", then ", 14 waiting for review").
  5. Item (__item): an <a href> 56px pill whose whole row is the indicator: a 24px icon (__icon), 12px, the label (__label).
  6. Divider (__divider): an hr, a 1px --color-outline-variant hairline with 16px margins.
  7. Way back (__back): an outlined, full-width button link, "Back to …", with a mirrored 20px arrow_back.
  8. Menu row (phones; .oa-app-shell__menu): a 48px full-width button with the menu icon and the word "Menu", a bottom hairline.
  9. Side sheet (phones): a modal side sheet from the inline start (.oa-side-sheet--start) with the title "Menu", a Close button, and the drawer (--sheet).

Variants

Variant Use for Key tokens
Column (.oa-nav-drawer) From 768px, the console shell's first column --size-nav-drawer, --color-surface, --space-3 padding
In a side sheet (.oa-nav-drawer--sheet) Below 768px, inside the modal side sheet the sheet's --color-surface-raised, 24px padding, --container-side-sheet

Sizes

Size Height Padding Type style Icon size
Drawer the shell's row; it scrolls on its own 12px; 272px wide (--size-nav-drawer) — —
Group button at least 48px (--size-touch-target) 8px block, 16px inline label-md 24px chevron
Item at least 56px (--size-list-row) 16px inline; icon to label 12px label-md, 500 at rest, 700 current 24px (--size-icon-lg)
Divider 1px 16px margins — —
Way back 48px (--size-button-md), wraps to two lines at most 24px inline label-lg 20px (--size-icon-md)
Menu row 48px 16px + side inset inline label-md 24px
Side sheet full height 24px + insets title title-lg —

Tokens

Part Property Token
Drawer width, padding, background --size-nav-drawer, --space-3, none in the console shell: the shell's --color-surface-container shows (D-CSN-58); --color-surface anywhere else
First list (ungrouped places) gap to the groups --space-2
Group gap between groups --space-1
Group button height, padding, shape --size-touch-target, --space-2 / --space-4, --radius-full
Group button label --text-label-md, --color-on-surface-variant
Chevron turn --duration-short-4, --ease-standard
Item height, padding, gap --size-list-row, --space-4, --space-3
Item rest --color-on-surface-variant, --font-weight-medium
Item current --color-primary-container row, --color-on-surface label at --font-weight-bold, --color-on-primary-container filled icon
Item, group button, Menu row state layer currentColor at --opacity-state-hover, --opacity-state-pressed; fade --duration-short-3
Divider line, margins --color-outline-variant, --space-4
Way back edge, label --color-outline, --color-primary-ink (button.md)
Menu row edge, label --color-outline-variant, --color-on-surface-variant

States

State What changes
Item at rest Outlined icon and label in on-surface-variant, weight 500.
Item hover / pressed An 8% / 12% layer of the content color over the whole pill (--opacity-state-hover, --opacity-state-pressed); hover only under (hover: hover), pressed at once.
Item focus-visible The 3px --color-focus-ring ring 2px outside the pill.
Item current ([aria-current="page"]) The whole row primary-container, the icon filled in on-primary-container, the label on-surface at 700 (D-CSN-14).
Group open / closed [aria-expanded="true"], the chevron turned 180°, the list shown; closed: the list [hidden], out of the Tab order and the accessibility tree.
Group hover / pressed / focus The same layers and ring as items.
Menu row The layers; the ring drawn inside the row (--size-focus-inset), which is full bleed; [aria-expanded="true"] while the sheet is open.
Disabled None: a place that is not available is not listed.

Behavior

  • Groups are disclosures. Each group button toggles its list ([aria-expanded], [aria-controls]); several groups may be open; the group of the current page is always open, so the lit place is never hidden. The chevron turns over --duration-short-4 --ease-standard; the list never animates its height (canonical §10.25).
  • Remembered per device. A product may keep the groups a person opened or closed (Global ID keeps them in localStorage); storage is a convenience and the drawer draws its defaults without it.
  • Scrolling. From 768px the drawer's column scrolls on its own (overflow-y: auto, overscroll-behavior: contain), apart from the main region.
  • Phones. The Menu row opens the drawer in a modal side sheet with showModal(): it slides in from the inline start over --duration-short-4 --ease-emphasized while the scrim fades; focus moves to the sheet and stays; Escape, the scrim, Close, and choosing a place close it; focus returns to the Menu row; the page behind is inert (side sheet, D-CSN-12, D-CSN-13).
  • The way out. The outlined "Back to …" link after the divider leaves the console for the product's member area (D-CSN-13).
  • Reduced motion. The chevron turns and the sheet appears at once.

Accessibility

  • <nav aria-label="Admin console">: the console's name, the same words as the context chip.
  • Group buttons are <button type="button"> with [aria-expanded] and [aria-controls]; each list is [aria-labelledby] its group name.
  • Places are <a href> named by their labels; the icons are [aria-hidden="true"]; the current place carries [aria-current="page"].
  • The way back is a link (it navigates) drawn as an outlined button; its arrow is [aria-hidden] (canonical §10.0).
  • Menu row: <button type="button" aria-expanded aria-controls> pointing at the sheet; the sheet is a native <dialog> named by its title "Menu", with a 48px "Close" button.
  • Keyboard: Tab through group buttons and the places of open groups; Enter or Space toggles a group; Enter follows a place; in the sheet, Tab stays inside and Escape closes.
  • Targets: items are 56px tall; group buttons and the Menu row are 48px tall; all are full width (D-LAY-12).
  • Contrast: rest labels on-surface-variant on surface 8.88:1 light, 10.87:1 dark; the current label on-surface on primary-container 13.22:1 and 9.07:1; the current icon 13.22:1 and 9.06:1.
  • Forced colors: the current row gains a 2px Highlight edge; the bold label and filled icon remain.

RTL and languages

  • In Arabic the drawer is the column at the right, the inline start, and the phone sheet opens from the right (D-BCP-30).
  • arrow_back mirrors and points right in Arabic; expand_more never mirrors (canonical §8.3).
  • Labels wrap inside the row rather than truncate ("Applications connectées", "Historique des scans"); the way back wraps to two lines at most.
  • The product name inside the way back stays Latin and in one piece, in every language: "Back to my Global ID", "العودة إلى Global ID الخاص بي". When the label wraps, it never wraps inside the name: base.css keeps every bdi[translate="no"] on one line (white-space: nowrap), because a break would split the name and scramble it in Arabic (canonical §1.2, §10.1).

Content

Part Rule English Arabic French
Drawer name The console's name Admin console لوحة الإدارة Console d’administration
Group names A noun for the area, sentence case Directory · Events · Places and scans · Platform الدليل · الفعاليات · الأماكن والمسح · المنصة Annuaire · Événements · Lieux et scans · Plateforme
Places The page's title; a verb phrase only for a one-task page People · Add a person · Photos · Scan history الأشخاص · إضافة شخص · الصور · سجل المسح Personnes · Ajouter une personne · Photos · Historique des scans
Way back "Back to {place}" Back to my Global ID العودة إلى Global ID الخاص بي Retour à mon Global ID
Menu row The word "Menu" Menu القائمة Menu
  • US spelling ("Organization"); "and", never "&" ("Places and scans") (canonical §12.2).

Do and don't

Do Don't
Group places under short nouns, and keep the current group open. Close the group that holds the page the person is on.
Start with "Overview", outside the groups. Open a console on a table with no word on what needs attention.
Give the whole 56px row the current fill. Draw a separate small pill inside the drawer row.
Open the phone drawer as a modal side sheet. Drop a non-modal panel over the page from the Menu row.
Keep the visible word "Menu" on the phone row. Use an unlabeled menu icon for the console.
End with one way back, after the divider. Mix the way back into a group as another place.

Code

HTML (reference CSS)

The drawer (the console shell's first column from 768px):

<nav class="oa-nav-drawer" aria-label="Admin console">
  <ul class="oa-nav-drawer__list">
    <li><a class="oa-nav-drawer__item" href="#an-nd-overview"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">dashboard</span><span class="oa-nav-drawer__label">Overview</span></a></li>
  </ul>
  <div class="oa-nav-drawer__group">
    <button class="oa-nav-drawer__group-btn" type="button" aria-expanded="true" aria-controls="an-nd-directory"><span class="oa-nav-drawer__group-label" id="an-nd-directory-title">Directory</span><span class="oa-icon oa-nav-drawer__chevron" aria-hidden="true" translate="no">expand_more</span></button>
    <ul class="oa-nav-drawer__list" id="an-nd-directory" aria-labelledby="an-nd-directory-title">
      <li><a class="oa-nav-drawer__item" href="#an-nd-people" aria-current="page"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">group</span><span class="oa-nav-drawer__label">People</span></a></li>
      <li><a class="oa-nav-drawer__item" href="#an-nd-add"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">person_add</span><span class="oa-nav-drawer__label">Add a person</span></a></li>
      <li><a class="oa-nav-drawer__item" href="#an-nd-organization"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">account_tree</span><span class="oa-nav-drawer__label">Organization</span></a></li>
      <li><a class="oa-nav-drawer__item" href="#an-nd-photos"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">photo_camera</span><span class="oa-nav-drawer__label">Photos</span></a></li>
      <li><a class="oa-nav-drawer__item" href="#an-nd-guests"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">badge</span><span class="oa-nav-drawer__label">Guests</span></a></li>
    </ul>
  </div>
  <div class="oa-nav-drawer__group">
    <button class="oa-nav-drawer__group-btn" type="button" aria-expanded="true" aria-controls="an-nd-scanning"><span class="oa-nav-drawer__group-label" id="an-nd-scanning-title">Places and scans</span><span class="oa-icon oa-nav-drawer__chevron" aria-hidden="true" translate="no">expand_more</span></button>
    <ul class="oa-nav-drawer__list" id="an-nd-scanning" aria-labelledby="an-nd-scanning-title">
      <li><a class="oa-nav-drawer__item" href="#an-nd-places"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">apartment</span><span class="oa-nav-drawer__label">Places</span></a></li>
      <li><a class="oa-nav-drawer__item" href="#an-nd-stations"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">qr_code_scanner</span><span class="oa-nav-drawer__label">Stations</span></a></li>
      <li><a class="oa-nav-drawer__item" href="#an-nd-presence"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">how_to_reg</span><span class="oa-nav-drawer__label">On campus</span></a></li>
      <li><a class="oa-nav-drawer__item" href="#an-nd-history"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">history</span><span class="oa-nav-drawer__label">Scan history</span></a></li>
    </ul>
  </div>
  <div class="oa-nav-drawer__group">
    <button class="oa-nav-drawer__group-btn" type="button" aria-expanded="false" aria-controls="an-nd-platform"><span class="oa-nav-drawer__group-label" id="an-nd-platform-title">Platform</span><span class="oa-icon oa-nav-drawer__chevron" aria-hidden="true" translate="no">expand_more</span></button>
    <ul class="oa-nav-drawer__list" id="an-nd-platform" aria-labelledby="an-nd-platform-title" hidden>
      <li><a class="oa-nav-drawer__item" href="#an-nd-audit"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">policy</span><span class="oa-nav-drawer__label">Audit log</span></a></li>
      <li><a class="oa-nav-drawer__item" href="#an-nd-keys"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">key</span><span class="oa-nav-drawer__label">API keys</span></a></li>
    </ul>
  </div>
  <hr class="oa-nav-drawer__divider">
  <a class="oa-btn oa-btn--outlined oa-btn--wide oa-nav-drawer__back" href="#an-nd-back"><span class="oa-icon oa-btn__icon oa-icon--mirror" aria-hidden="true" translate="no">arrow_back</span><span class="oa-btn__label">Back to my <bdi lang="en" translate="no">Global ID</bdi></span></a>
</nav>

Below 768px, the Menu row under the top app bar, and the drawer in its side sheet:

<button class="oa-app-shell__menu" type="button" aria-expanded="false" aria-controls="an-ndm-sheet"><span class="oa-icon" aria-hidden="true" translate="no">menu</span>Menu</button>
<div class="oa-scrim oa-scrim--demo">
  <dialog class="oa-side-sheet oa-side-sheet--start" id="an-ndm-sheet" aria-labelledby="an-ndm-title" open>
    <div class="oa-dialog__header">
      <h2 class="oa-dialog__title" id="an-ndm-title">Menu</h2>
      <button class="oa-icon-btn oa-dialog__close" type="button" aria-label="Close"><span class="oa-icon" aria-hidden="true" translate="no">close</span></button>
    </div>
    <nav class="oa-nav-drawer oa-nav-drawer--sheet" aria-label="Admin console">
      <ul class="oa-nav-drawer__list">
        <li><a class="oa-nav-drawer__item" href="#an-ndm-overview"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">dashboard</span><span class="oa-nav-drawer__label">Overview</span></a></li>
      </ul>
      <div class="oa-nav-drawer__group">
        <button class="oa-nav-drawer__group-btn" type="button" aria-expanded="true" aria-controls="an-ndm-directory"><span class="oa-nav-drawer__group-label" id="an-ndm-directory-title">Directory</span><span class="oa-icon oa-nav-drawer__chevron" aria-hidden="true" translate="no">expand_more</span></button>
        <ul class="oa-nav-drawer__list" id="an-ndm-directory" aria-labelledby="an-ndm-directory-title">
          <li><a class="oa-nav-drawer__item" href="#an-ndm-people" aria-current="page"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">group</span><span class="oa-nav-drawer__label">People</span></a></li>
          <li><a class="oa-nav-drawer__item" href="#an-ndm-add"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">person_add</span><span class="oa-nav-drawer__label">Add a person</span></a></li>
          <li><a class="oa-nav-drawer__item" href="#an-ndm-photos"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">photo_camera</span><span class="oa-nav-drawer__label">Photos</span></a></li>
        </ul>
      </div>
      <hr class="oa-nav-drawer__divider">
      <a class="oa-btn oa-btn--outlined oa-btn--wide oa-nav-drawer__back" href="#an-ndm-back"><span class="oa-icon oa-btn__icon oa-icon--mirror" aria-hidden="true" translate="no">arrow_back</span><span class="oa-btn__label">Back to my <bdi lang="en" translate="no">Global ID</bdi></span></a>
    </nav>
  </dialog>
</div>

Arabic:

<div dir="rtl" lang="ar">
  <nav class="oa-nav-drawer" aria-label="لوحة الإدارة">
    <div class="oa-nav-drawer__group">
      <button class="oa-nav-drawer__group-btn" type="button" aria-expanded="true" aria-controls="an-nda-directory"><span class="oa-nav-drawer__group-label" id="an-nda-directory-title">الدليل</span><span class="oa-icon oa-nav-drawer__chevron" aria-hidden="true" translate="no">expand_more</span></button>
      <ul class="oa-nav-drawer__list" id="an-nda-directory" aria-labelledby="an-nda-directory-title">
        <li><a class="oa-nav-drawer__item" href="#an-nda-people" aria-current="page"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">group</span><span class="oa-nav-drawer__label">الأشخاص</span></a></li>
        <li><a class="oa-nav-drawer__item" href="#an-nda-add"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">person_add</span><span class="oa-nav-drawer__label">إضافة شخص</span></a></li>
        <li><a class="oa-nav-drawer__item" href="#an-nda-history"><span class="oa-icon oa-nav-drawer__icon" aria-hidden="true" translate="no">history</span><span class="oa-nav-drawer__label">سجل المسح</span></a></li>
      </ul>
    </div>
    <hr class="oa-nav-drawer__divider">
    <a class="oa-btn oa-btn--outlined oa-btn--wide oa-nav-drawer__back" href="#an-nda-back"><span class="oa-icon oa-btn__icon oa-icon--mirror" aria-hidden="true" translate="no">arrow_back</span><span class="oa-btn__label">العودة إلى <bdi lang="en" translate="no">Global ID</bdi> الخاص بي</span></a>
  </nav>
</div>

Tailwind CSS v4

<nav aria-label="Admin console" class="flex flex-col p-3">
  <!-- no background: the console shell's surface-container shows through (D-CSN-58) -->
  <ul class="m-0 mb-2 flex list-none flex-col p-0">
    <li><!-- the item below, with dashboard and "Overview": the first destination --></li>
  </ul>
  <div class="flex flex-col">
    <button type="button" aria-expanded="true" aria-controls="directory" class="relative isolate flex min-h-12 w-full items-center gap-3 rounded-full border border-transparent px-4 py-2 text-start text-label-md text-on-surface-variant before:absolute before:-inset-px before:-z-1 before:rounded-full before:bg-current before:opacity-0 before:transition-opacity before:duration-short-3 hover:before:opacity-8 active:before:opacity-12 active:before:duration-0 aria-expanded:[&>:last-child]:rotate-180">
      <span id="directory-title" class="min-w-0 flex-1">Directory</span>
      <Icon name="expand_more" className="transition-transform duration-short-4 ease-standard" />
    </button>
    <ul id="directory" aria-labelledby="directory-title" class="m-0 flex list-none flex-col p-0">
      <li>
        <a href="/admin/people" aria-current="page" class="relative isolate flex min-h-14 items-center gap-3 rounded-full border border-transparent px-4 text-label-md font-medium text-on-surface-variant no-underline before:absolute before:-inset-px before:-z-1 before:rounded-full before:bg-current before:opacity-0 before:transition-opacity before:duration-short-3 hover:before:opacity-8 active:before:opacity-12 active:before:duration-0 aria-[current=page]:bg-primary-container aria-[current=page]:font-bold aria-[current=page]:text-on-surface aria-[current=page]:[&>:first-child]:text-on-primary-container">
          <Icon name="group" filled={current} />
          <span class="min-w-0 flex-1">People</span>
        </a>
      </li>
    </ul>
  </div>
  <hr class="m-4 h-0 border-0 border-t border-outline-variant">
  <!-- the way back: an outlined md button link, full width (button.md), with a mirrored 20px arrow_back -->
  <a href="/home"><Icon name="arrow_back" size={20} mirror />Back to my <bdi lang="en" translate="no" class="whitespace-nowrap">Global ID</bdi></a>
</nav>
<!-- Below md: the Menu row -->
<button type="button" aria-expanded="false" aria-controls="console-menu" class="relative isolate flex min-h-12 w-full items-center gap-3 border border-transparent border-b-outline-variant bg-surface pr-[calc(1rem+env(safe-area-inset-right))] pl-[calc(1rem+env(safe-area-inset-left))] text-start text-label-md text-on-surface-variant before:absolute before:-inset-px before:-z-1 before:bg-current before:opacity-0 before:transition-opacity before:duration-short-3 hover:before:opacity-8 focus-visible:-outline-offset-4 active:before:opacity-12 active:before:duration-0 md:hidden">
  <Icon name="menu" />Menu
</button>

The button turns its last child, the chevron, through aria-expanded:[&>:last-child]:rotate-180.

React

Prop (NavigationDrawer) Type Default Description
label string — The nav's name: the console's name ("Admin console")
groups DrawerGroup[] — { key: string; heading: string; items: NavItem[]; startsOpen?: boolean }; the group of the current place is always open
back { href: string; label: string } — The way back after the divider ("Back to my Global ID")
menuLabel string — The phone row's word ("Menu") and the side sheet's title
closeLabel string 'Close' The side sheet's close button name
storageKey string — When set, the open and closed groups are kept on this device under that key
<NavigationDrawer
  label={t('admin.console')}
  menuLabel={t('admin.menu')}
  back={{ href: '/home', label: t('admin.back') }}
  groups={[
    { key: 'directory', heading: t('admin.groups.directory'), startsOpen: true, items: [
      { href: '/admin/people', icon: 'group', label: t('admin.people'), current: section === 'people' && 'page' },
      { href: '/admin/people/new', icon: 'person_add', label: t('admin.add'), current: section === 'add' && 'page' },
    ] },
    { key: 'scanning', heading: t('admin.groups.scanning'), items: [/* … */] },
  ]}
/>