Skip to content
OAIT Design System

Design system / Components

Navigation rail

The member app's navigation from 768px: a 96px column at the inline start, its destinations stacked as icons in indicator pills above their labels.

When to use

  • From 768px in a member app, in the place the navigation bar holds on phones: Global ID, the Games event passport, the Tamakkan dashboard (D-CSN-13, D-LAY-09).
  • It shows the bar's destinations. From 768px it may also show the pages that one bar destination gathers on phones: Global ID's bar has Me; its rail shows Profile and Security in its place, never more than five destinations (canonical §10.15).

When not to use

Anatomy

  1. Container: <nav class="oa-nav-rail" aria-label="…">, 96px wide on surface, in the shell's navigation column (.oa-app-shell__nav).
  2. List (__list): a ul, destinations 12px apart from the top.
  3. Destination (__item): an <a href> 80px wide and at least 56px tall, the icon above the label 4px apart.
  4. Indicator (__indicator): a 56×32 pill that carries the state layer and, when current, the primary-container fill.
  5. Icon (__icon): 24px, outlined at rest, filled when current.
  6. Label (__label): label-sm, 500 at rest, 700 when current; it wraps inside the 80px item.

Variants

Variant Use for Key tokens
Destination at rest Every destination but the current one --color-on-surface-variant, no fill
Current destination The open page, or the destination that holds it --color-primary-container pill, --color-on-primary-container filled icon, --color-on-surface label at --font-weight-bold

Destinations always show icon and label (D-CSN-14). 1.0 specifies none of Material 3's rail extras (a menu button, a floating action button, an expanded rail).

Sizes

Size Height Padding Type style Icon size
Rail the shell's row; it scrolls with its column when the window is short 12px top, 24px bottom; 96px wide (--size-nav-rail) — —
Destination at least 56px; 80px wide (component constants) — label-sm (12/16) 24px (--size-icon-lg)
Indicator 32px 56px wide (component constant) — —

Tokens

Part Property Token
Rail width --size-nav-rail (w-24)
Rail background --color-surface
Rail padding --space-3 top, --space-6 bottom
List gap --space-3
Destination rest color --color-on-surface-variant
Destination current label --color-on-surface, --font-weight-bold
Destination icon–label gap --space-1
Indicator shape --radius-full
Indicator current fill, icon --color-primary-container, --color-on-primary-container
Indicator state layer currentColor at --opacity-state-hover, --opacity-state-pressed
Label type --text-label-sm and its companions

States

State What changes
Enabled (rest) Outlined icon and label in on-surface-variant, weight 500; no pill.
Hover 8% layer on the pill (--opacity-state-hover), under (hover: hover), fading over --duration-short-3 --ease-standard.
Pressed 12% layer on the pill (--opacity-state-pressed), at once.
Focus-visible The 3px --color-focus-ring ring 2px outside the pill-shaped destination; the rail's 8px side margins and 12px top padding keep it inside the scrolling column.
Current ([aria-current="page"] or "true") primary-container pill, filled on-primary-container icon, on-surface label at 700 (D-CSN-14).
Disabled None: remove a place that is not available.

Behavior

  • Width switch. The app shell shows the rail from 768px, in the first column (auto wide), and the bar below 768px (D-LAY-09).
  • Top aligned. Destinations start at the top of the column; the column scrolls on its own (overflow-y: auto, overscroll-behavior: contain) when the window is shorter than the list.
  • Safe areas. From 768px the shell pads the side insets for the whole grid, so the rail needs none of its own (D-LAY-17).
  • Motion. Only the layer fades; nothing slides or expands (D-SEM-15).

Accessibility

  • <nav> with an [aria-label] in the page language (Global ID's rail: "Global ID"; its bar: "Global ID app"), holding a ul of links.
  • Each destination is one <a href> named by its visible label; the icon is [aria-hidden="true"].
  • [aria-current="page"] on the open page's destination; "true" on a destination that holds it.
  • Keyboard: Tab through the destinations in order; Enter follows. No arrow keys.
  • Targets: 80×56px or larger (D-LAY-12).
  • Contrast: labels on-surface-variant on surface 8.88:1 light, 10.87:1 dark; current on-surface 16.30:1 and 14.32:1; the current icon 13.22:1 and 9.06:1 on primary-container.
  • Forced colors: the current pill gains a 2px Highlight edge; the filled icon and bold label remain.

RTL and languages

  • In Arabic the rail is the column at the right edge, the inline start; the grid places it there by itself (D-BCP-30).
  • Icons never mirror. Labels center under their icons in every language.
  • Long labels wrap inside the 80px item ("ملفي الشخصي"); they never truncate and never widen the rail (canonical §10.0).
  • Arabic labels take the taller Arabic line height; destinations grow with min-height.

Content

Rule English Arabic French
One or two words, a noun for the place Home · My ID · Vault · Profile · Security الرئيسية · هويتي · الخزنة · ملفي الشخصي · الأمان Accueil · Mon ID · Coffre-fort · Profil · Sécurité
The nav name: the product Global ID Global ID Global ID
  • Use the same words as the bar for the same place; a rail-only place takes its page's title ("Profile", "Security").
  • Sentence case, no verbs, no counts in the label.

Do and don't

Do Don't
Keep the bar's destinations, in the bar's order. Reorder places between the bar and the rail.
Keep two to five destinations; move a sixth under another destination or into the account menu. Add a sixth destination to the rail.
Let long labels wrap inside 80px. Truncate labels or widen the rail.
Use the drawer when places come in groups. Put group headings or dividers in the rail.
Mark the current destination with [aria-current]. Mark it with color alone.

Code

HTML (reference CSS)

<nav class="oa-nav-rail" aria-label="Global ID">
  <ul class="oa-nav-rail__list">
    <li><a class="oa-nav-rail__item" href="#an-nr-home"><span class="oa-nav-rail__indicator"><span class="oa-icon oa-nav-rail__icon" aria-hidden="true" translate="no">home</span></span><span class="oa-nav-rail__label">Home</span></a></li>
    <li><a class="oa-nav-rail__item" href="#an-nr-id" aria-current="page"><span class="oa-nav-rail__indicator"><span class="oa-icon oa-nav-rail__icon" aria-hidden="true" translate="no">badge</span></span><span class="oa-nav-rail__label">My ID</span></a></li>
    <li><a class="oa-nav-rail__item" href="#an-nr-vault"><span class="oa-nav-rail__indicator"><span class="oa-icon oa-nav-rail__icon" aria-hidden="true" translate="no">lock</span></span><span class="oa-nav-rail__label">Vault</span></a></li>
    <li><a class="oa-nav-rail__item" href="#an-nr-profile"><span class="oa-nav-rail__indicator"><span class="oa-icon oa-nav-rail__icon" aria-hidden="true" translate="no">person</span></span><span class="oa-nav-rail__label">Profile</span></a></li>
    <li><a class="oa-nav-rail__item" href="#an-nr-security"><span class="oa-nav-rail__indicator"><span class="oa-icon oa-nav-rail__icon" aria-hidden="true" translate="no">verified_user</span></span><span class="oa-nav-rail__label">Security</span></a></li>
  </ul>
</nav>

Arabic:

<div dir="rtl" lang="ar">
  <nav class="oa-nav-rail" aria-label="Global ID">
    <ul class="oa-nav-rail__list">
      <li><a class="oa-nav-rail__item" href="#an-nra-home" aria-current="page"><span class="oa-nav-rail__indicator"><span class="oa-icon oa-nav-rail__icon" aria-hidden="true" translate="no">home</span></span><span class="oa-nav-rail__label">الرئيسية</span></a></li>
      <li><a class="oa-nav-rail__item" href="#an-nra-id"><span class="oa-nav-rail__indicator"><span class="oa-icon oa-nav-rail__icon" aria-hidden="true" translate="no">badge</span></span><span class="oa-nav-rail__label">هويتي</span></a></li>
      <li><a class="oa-nav-rail__item" href="#an-nra-vault"><span class="oa-nav-rail__indicator"><span class="oa-icon oa-nav-rail__icon" aria-hidden="true" translate="no">lock</span></span><span class="oa-nav-rail__label">الخزنة</span></a></li>
      <li><a class="oa-nav-rail__item" href="#an-nra-profile"><span class="oa-nav-rail__indicator"><span class="oa-icon oa-nav-rail__icon" aria-hidden="true" translate="no">person</span></span><span class="oa-nav-rail__label">ملفي الشخصي</span></a></li>
      <li><a class="oa-nav-rail__item" href="#an-nra-security"><span class="oa-nav-rail__indicator"><span class="oa-icon oa-nav-rail__icon" aria-hidden="true" translate="no">verified_user</span></span><span class="oa-nav-rail__label">الأمان</span></a></li>
    </ul>
  </nav>
</div>

Tailwind CSS v4

<nav aria-label="Global ID" class="hidden w-24 flex-col items-center bg-surface pt-3 pb-6 md:flex">
  <ul class="m-0 flex list-none flex-col items-center gap-3 p-0">
    <li>
      <a href="/id" aria-current="page" class="flex min-h-14 w-20 flex-col items-center justify-center gap-1 rounded-full text-center text-on-surface-variant no-underline hover:[&>:first-child]:before:opacity-8 active:[&>:first-child]:before:opacity-12 active:[&>:first-child]:before:duration-0 aria-[current=page]:text-on-surface aria-[current=page]:[&>:first-child]:bg-primary-container aria-[current=page]:[&>:first-child]:text-on-primary-container aria-[current=page]:[&>:last-child]:font-bold aria-[current=true]:text-on-surface aria-[current=true]:[&>:first-child]:bg-primary-container aria-[current=true]:[&>:first-child]:text-on-primary-container aria-[current=true]:[&>:last-child]:font-bold">
        <span class="relative isolate inline-flex h-8 w-14 items-center justify-center rounded-full before:absolute before:inset-0 before:-z-1 before:rounded-full before:bg-current before:opacity-0 before:transition-opacity before:duration-short-3">
          <Icon name="badge" filled={current} />
        </span>
        <span class="text-label-sm">My ID</span>
      </a>
    </li>
    <!-- Home, Vault, Profile, Security -->
  </ul>
</nav>

In the shell the rail sits in the navigation column (the app shell), which scrolls on its own. The current look is written twice, once per value of [aria-current] ("page" and "true"), as the reference CSS styles both.

React

Prop (NavigationRail) Type Default Description
label string — The nav's accessible name, in the page language ("Global ID")
destinations NavItem[] — Two to five destinations: { href: string; icon: string; label: string; current: false | 'page' | 'true' }; current becomes the link's [aria-current], left out when false
<NavigationRail
  label={t('shell.siteNav')}
  destinations={[
    { href: '/home', icon: 'home', label: t('shell.home'), current: section === 'home' && 'page' },
    { href: '/id', icon: 'badge', label: t('shell.myId'), current: section === 'id' && 'page' },
    { href: '/vault', icon: 'lock', label: t('shell.vault'), current: section === 'vault' && 'page' },
    { href: '/me', icon: 'person', label: t('shell.profile'), current: section === 'me' && 'page' },
    { href: '/security', icon: 'verified_user', label: t('shell.security'), current: section === 'security' && 'page' },
  ]}
/>