Skip to content
OAIT Design System

Design system / Components

Navigation bar

The bottom bar of the member app on phones: two to five destinations, each an icon in an indicator pill above a label, as the last row of the app shell.

When to use

  • Below 768px in a member app with two to five top destinations: Global ID (Home, My ID, Vault, Me), the Games event passport, the Tamakkan dashboard (D-CSN-13).
  • From 768px the same destinations move to the navigation rail; the shell switches them at the md breakpoint (canonical §4.2).

When not to use

  • More than five places, or places in groups (consoles): use the "Menu" row and the navigation drawer.
  • Marketing and public pages: the site header and its menu sheet.
  • Switching views of one page: use tabs; setting a mode: a segmented button.
  • Never together with a sticky action bar: a page with a bottom bar puts its main action in the content (canonical §10.29).
  • Kiosks, scanners, and stations: no navigation chrome (D-CSN-13).

Anatomy

  1. Container: <nav class="oa-nav-bar" aria-label="…"> on surface-container, the last grid row of the app shell (__bar).
  2. List (__list): a ul whose items share the width equally.
  3. Destination (__item): an <a href> filling its share, at least 48px tall, the icon above the label 4px apart.
  4. Indicator (__indicator): a 64×32 pill that carries the state layer, and the primary-container fill on the current destination.
  5. Icon (__icon): 24px Material Symbols Rounded, outlined at rest, filled when current.
  6. Label (__label): label-sm, 500 at rest, 700 when current.

Variants

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

Every destination shows its icon and its label, at rest and current (D-CSN-14); 1.0 specifies no other variant of the bar.

Sizes

Size Height Padding Type style Icon size
Bar 80px + bottom inset (--size-nav-bar) 12px top; 16px + bottom inset below; 8px + side insets at the sides — —
Destination at least 48px (--size-touch-target); 52px with one label line — label-sm (12/16) 24px (--size-icon-lg)
Indicator 32px 64px wide (component constant) — —

Tokens

Part Property Token
Bar background --color-surface-container (bg-surface-container)
Bar padding --space-3 top, --space-4 + env(safe-area-inset-bottom) bottom, --space-2 + side insets
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
Layer fade --duration-short-3, --ease-standard

States

State What changes
Enabled (rest) Outlined icon and label in on-surface-variant, weight 500; no pill.
Hover An 8% layer of the content color on the indicator pill (--opacity-state-hover), only under (hover: hover), fading over --duration-short-3.
Pressed A 12% layer on the pill (--opacity-state-pressed), at once.
Focus-visible The 3px --color-focus-ring ring 2px outside the destination, which is pill-shaped (--radius-full). No focus layer.
Current ([aria-current="page"]) primary-container pill, filled on-primary-container icon, on-surface label at 700. Three cues, so the state never rests on color: the pill is 1.11:1 against the bar (D-CSN-14).
Disabled None: a destination is a link and links are never disabled; remove a place that is not available.
Hidden While the on-screen keyboard is open the bar carries [hidden].

Behavior

  • A grid row, never fixed. The bar is the shell's last row (.oa-app-shell__bar), so it ends where the grid ends and does not move with iOS's address bar or keyboard; it is never position: fixed (D-LAY-09).
  • Keyboard open. It hides while the on-screen keyboard is open, so it never sits on the keyboard. The script sets [hidden] on the nav while visualViewport.height × visualViewport.scale < 0.75 × innerHeight, and removes it when that stops being true (D-LAY-17).
  • Width switch. The shell shows the bar below 768px and the rail from 768px; the two may hold different labels for the same places (Global ID: Me on the bar, Profile and Security on the rail).
  • Current destination. The page's own destination is [aria-current="page"]. A page inside a destination (Global ID's Security, which lives under Me on phones) marks that destination [aria-current="true"]; both draw the current look.
  • Safe areas. Bottom: 16px plus the bottom inset; sides: 8px plus the side insets, physical in both directions (canonical §4.10). The reference CSS reads them as --oa-safe-bottom, --oa-safe-start, and --oa-safe-end (base.css), which a hybrid shell can supply; Tailwind writes env(safe-area-inset-*).
  • Snackbars sit 16px above the bar: the host takes .oa-snackbar-host--nav-bar (calc(6rem + env(safe-area-inset-bottom))) (canonical §10.21).
  • Motion. Only the layer fades (--duration-short-3, --ease-standard); nothing slides, scales, or ripples (D-SEM-15). Under reduced motion the layer changes at once.

Accessibility

  • <nav> with an [aria-label] in the page language ("Global ID app"), holding a ul of links; each destination is one <a href> (canonical §10.0).
  • The link's name is its visible label; the icon is [aria-hidden="true"] and [translate="no"].
  • [aria-current="page"] on the current destination (or "true", above); never a class alone.
  • Keyboard: Tab moves through the destinations in order; Enter follows the link. No arrow keys (it is navigation, not a tab list).
  • Targets: each destination fills its share of the bar and is at least 48px tall (D-LAY-12).
  • Contrast: labels on-surface-variant on surface-container 7.97:1 light, 9.59:1 dark; current on-surface 14.62:1 and 12.63:1; the current icon on-primary-container on primary-container 13.22:1 and 9.06:1.
  • Forced colors: the current pill gains a 2px Highlight edge; the filled icon and the bold label remain.
  • Reduced motion: nothing moves; the layer changes at once.

RTL and languages

  • The destinations follow the direction: in Arabic the first one sits at the right. Icons never mirror (home, badge, lock, person) (canonical §8.3).
  • Arabic labels take the taller Arabic line height (1.75), so the bar grows to about 85px; it uses min-height, never a fixed height (D-TYP-14).
  • French at 360px: labels wrap to a second line rather than truncate ("Coffre-fort" fits). Keep labels to one or two words (D-TYP-15).
  • Side insets are physical in both directions.

Content

Rule English Arabic French
One or two words, a noun for the place, sentence case Home · My ID · Vault · Me الرئيسية · هويتي · الخزنة · أنا Accueil · Mon ID · Coffre-fort · Moi
The nav name: the product's app Global ID app تطبيق Global ID Application Global ID
  • Labels speak as the person only when the place is theirs ("My ID", "Me"); never verbs ("Show my ID" is an action on Home) (D-BCP-16, canonical §12.1).
  • Product names stay Latin; in an [aria-label] inside Arabic, wrap them in U+2066 … U+2069 (canonical §1.2).

Do and don't

Do Don't
Keep two to five destinations with icons and labels. Show icons without labels, or labels only on the current item.
Make the bar the last grid row. Fix it to the window (position: fixed).
Hide it while the keyboard is open. Let it ride on top of the keyboard.
Mark the current destination with [aria-current]. Show "current" with color alone.
Use the same destinations on the rail from 768px. Use the bar on wide windows.

Code

HTML (reference CSS)

<nav class="oa-nav-bar" aria-label="Global ID app">
  <ul class="oa-nav-bar__list">
    <li><a class="oa-nav-bar__item" href="#an-nb-home" aria-current="page"><span class="oa-nav-bar__indicator"><span class="oa-icon oa-nav-bar__icon" aria-hidden="true" translate="no">home</span></span><span class="oa-nav-bar__label">Home</span></a></li>
    <li><a class="oa-nav-bar__item" href="#an-nb-id"><span class="oa-nav-bar__indicator"><span class="oa-icon oa-nav-bar__icon" aria-hidden="true" translate="no">badge</span></span><span class="oa-nav-bar__label">My ID</span></a></li>
    <li><a class="oa-nav-bar__item" href="#an-nb-vault"><span class="oa-nav-bar__indicator"><span class="oa-icon oa-nav-bar__icon" aria-hidden="true" translate="no">lock</span></span><span class="oa-nav-bar__label">Vault</span></a></li>
    <li><a class="oa-nav-bar__item" href="#an-nb-me"><span class="oa-nav-bar__indicator"><span class="oa-icon oa-nav-bar__icon" aria-hidden="true" translate="no">person</span></span><span class="oa-nav-bar__label">Me</span></a></li>
  </ul>
</nav>

Arabic:

<div dir="rtl" lang="ar">
  <nav class="oa-nav-bar" aria-label="تطبيق ⁦Global ID⁩">
    <ul class="oa-nav-bar__list">
      <li><a class="oa-nav-bar__item" href="#an-nba-home"><span class="oa-nav-bar__indicator"><span class="oa-icon oa-nav-bar__icon" aria-hidden="true" translate="no">home</span></span><span class="oa-nav-bar__label">الرئيسية</span></a></li>
      <li><a class="oa-nav-bar__item" href="#an-nba-id" aria-current="page"><span class="oa-nav-bar__indicator"><span class="oa-icon oa-nav-bar__icon" aria-hidden="true" translate="no">badge</span></span><span class="oa-nav-bar__label">هويتي</span></a></li>
      <li><a class="oa-nav-bar__item" href="#an-nba-vault"><span class="oa-nav-bar__indicator"><span class="oa-icon oa-nav-bar__icon" aria-hidden="true" translate="no">lock</span></span><span class="oa-nav-bar__label">الخزنة</span></a></li>
      <li><a class="oa-nav-bar__item" href="#an-nba-me"><span class="oa-nav-bar__indicator"><span class="oa-icon oa-nav-bar__icon" aria-hidden="true" translate="no">person</span></span><span class="oa-nav-bar__label">أنا</span></a></li>
    </ul>
  </nav>
</div>

Tailwind CSS v4

<nav aria-label="Global ID app" class="bg-surface-container pt-3 pr-[calc(0.5rem+env(safe-area-inset-right))] pb-[calc(1rem+env(safe-area-inset-bottom))] pl-[calc(0.5rem+env(safe-area-inset-left))] md:hidden">
  <ul class="m-0 flex list-none p-0">
    <li class="flex min-w-0 flex-1">
      <a href="/home" aria-current="page" class="flex min-h-12 min-w-0 flex-1 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-16 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="home" filled={current} />
        </span>
        <span class="text-label-sm">Home</span>
      </a>
    </li>
    <!-- My ID, Vault, Me -->
  </ul>
</nav>

The physical left and right padding classes are the safe-area insets (canonical §4.10). The link's variants reach its first child (the indicator) and last child (the label), so no group class is needed. The current look is written twice, once per value of [aria-current] ("page" and "true"), as the reference CSS styles both. In the shell the bar sits in the last grid row; md:hidden hands over to the rail.

React

Prop (NavigationBar) Type Default Description
label string — The nav's accessible name, in the page language ("Global ID app")
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
hideWithKeyboard boolean true Sets [hidden] while the on-screen keyboard is open (the visual-viewport test above)
<NavigationBar
  label={t('shell.appNav')}
  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.me'), current: section === 'me' ? 'page' : section === 'security' && 'true' },
  ]}
/>

'page' marks the open page's destination; 'true' marks the destination that holds the open page (Security under Me).