The bar at the top of every app shell: the product's home link, an optional context chip, and the language switcher and account control. It is the family's one header (D-CSN-51) inside an app: the same start zone and the same end order as the site header, with an empty middle, because the destinations live in the navigation bar, rail, or drawer. This page also specifies the app shell, the grid that the bar, the navigation, and the main region share.
When to use
At the top of every screen built on the app shell: the member app (Global ID Home, the Games event passport, the Tamakkan dashboard), consoles (Global ID admin, Tamakkan crew, the Games organizer console), and kiosk, scanner, and station screens (D-CSN-13, D-LAY-09).
Pick the shell, and with it the navigation, by surface and window class (D-CSN-13, canonical §10.15):
Destinations, tabs, and the page's main action never go in the top app bar: places belong to the bar, rail, or drawer, and the one filled button belongs to the page (D-CSN-13, D-CAI-04). The end cluster holds the language switcher and the account control only (canonical §10.15).
Anatomy
Top app bar:
Container: <header class="oa-top-app-bar">, surface (surface-container in the console shell, D-CSN-58), no edge, no shadow; 72px, or 64px below 768px with --compact, plus the top safe area.
Start group (__start): 16px inline-start padding, 24px from 768px; the home link and the chip, 12px apart.
Home link: the product lock-up (.oa-lockup, mixed with __home): one link home, at least 48px tall, never shrinks or wraps.
Context chip (optional): a secondary status chip mixed with __context, naming the area ("Admin console"); its label (__context-label) truncates first.
End group (__end): at the inline end, controls 8px apart, 4px inline-end padding (16px from 768px).
Language switcher: .oa-lang. With three languages it is a disclosure, icon-only below 768px, whose list composes the menu classes (oa-lang__list oa-menu, options oa-lang__option oa-menu__item); with two it is one button that keeps its endonym (canonical §10.28).
Account control: a 48px standard icon button holding the person's 40px avatar; it opens the account list, a disclosure list in the menu container. The button and the list share a .oa-menu__anchor, which places the list under the button at its inline end.
App shell:
Shell (.oa-app-shell): a 100dvh grid; only the main region scrolls.
Navigation column (__nav): the rail or the drawer from 768px; in the console, the Menu row (__menu) below 768px.
Main region (__main): <main id="main" tabindex="-1">, the skip link's target and the only scroller. It and the rail or drawer column (__nav) are position: relative, so an absolutely positioned child (a visually hidden legend) scrolls with them and never stretches the document under the shell.
Page frame (__content): capped at max-w-page (consoles max-w-wide), groups 24px apart, 32px from 768px.
Bottom bar row (__bar): the navigation bar, member app below 768px.
Snackbar host: .oa-snackbar-host, mounted empty at load; --nav-bar lifts it above the bottom bar.
Variants
Variant
Use for
Key tokens
Compact (.oa-top-app-bar--compact)
Shells with a bottom bar: the member app
--size-header-compact (64px) below md, --size-header (72px) from md
Standard (.oa-top-app-bar)
Consoles, kiosks, and every bar without a bottom bar
rows auto minmax(0,1fr) auto; from md columns auto minmax(0,1fr)
Console shell (.oa-app-shell--drawer)
More than five places, or grouped places
rows auto auto minmax(0,1fr); from md columns var(--size-nav-drawer) minmax(0,1fr); bar and drawer on surface-container, the page a surface sheet (D-CSN-58)
Plain shell (.oa-app-shell)
Kiosk, scanner, station
rows auto minmax(0,1fr)
Sizes
Size
Height
Padding
Type style
Icon size
Compact, below md
64px + top inset (--size-header-compact)
start 16px, end 4px, plus the side insets
Lock-up S: lockup-name-compact below 640px; M: lockup-name and the label-sm sub-line from 640px
24px; the three-language switcher is a 48px icon button
Standard
72px + top inset (--size-header)
start 16px → 24px, end 4px → 16px (md)
Lock-up S or M; chip label-md
Chip 18px (filled); switcher 20px beside its label; avatar 40px (--size-avatar-sm)
Shell main region
—
4px top, 24px bottom, 16px + side inset inline; from md 8px, 48px, 24px; the bottom adds the bottom inset where no bottom bar follows (consoles, plain shells, every shell from md)
—
—
Tokens
Part
Property
Token
Bar
background, text
--color-surface (bg-surface), --color-on-surface
Bar, in the console shell
background
--color-surface-container (bg-surface-container), the grade of the site header (D-CSN-58)
Console shell
shell and drawer; page sheet
--color-surface-container; --color-surface with --radius-card at the top inline-start from md and --space-6 above the first line
--size-button-md, --size-avatar-sm on --color-primary-container
Shell
height, background
100dvh, --color-surface
Shell
drawer column
--size-nav-drawer
Main region
padding
--space-1, --space-6, --space-gutter; from md --space-2, --space-12, --space-gutter-medium; plus the bottom inset (--oa-safe-bottom) at the bottom where no bottom bar follows
The bar has no states of its own: it never gains an edge, a shadow, or a fill when content scrolls (D-SEM-08, D-SEM-12).
Hover
The switcher and the account control show the 8% layer (--opacity-state-hover); the home link follows the lock-up's link rules.
Pressed
The 12% layer (--opacity-state-pressed), shown at once.
Focus-visible
The 3px --color-focus-ring ring 2px outside each control (--size-focus-ring, --size-focus-offset); nothing in the bar clips it.
Expanded
The switcher and the account control carry [aria-expanded="true"] while their list is open.
Selected, disabled, error, loading
None. The chip is not interactive.
Behavior
A grid row. The bar is the shell's first row. It never scrolls away and is never sticky or position: fixed; content scrolls in the main region below it, never under it, so the bar is opaque surface, not glass (D-LAY-09, D-SEM-12).
Height. The compact bar is 64px below 768px, where a bottom bar already takes 80px, and 72px from 768px; every other bar is 72px at every width (D-LAY-14).
Lock-up. S below 640px, M with the sub-line from 640px (D-ARC-28, D-BCP-09).
The chip gives way first. When the row runs out of room the chip label ends in an ellipsis; the home link never shrinks and the end controls keep their 48px. The full label stays in the accessibility tree (canonical §10.15, §11 row 7).
Language switcher. With three languages it is icon-only (48×48) below 768px and opens its list of endonyms; with two it is a button to the other language that keeps its visible endonym at every width (language switcher, canonical §10.28).
Account control. A disclosure: a button with [aria-expanded] and [aria-controls], then a list in the Tab order: links for places ("Get help" and the account pages the product has) and a button for "Sign out", which is an action (canonical §10.0). No role="menu". Escape, an outside press, focus leaving, and a choice close it; focus returns to the button (canonical §10.20).
Safe areas. The bar pads the top inset. Below 768px it pads the side insets itself; from 768px the shell pads them for every column. The bottom inset belongs to the row that meets the bottom edge: the navigation bar in the member app below 768px; otherwise the main region, and from 768px the rail or drawer column too (canonical §4.10, D-LAY-17).
The shell scrolls once. Only the main region scrolls (overflow-y: auto, overscroll-behavior: contain); the document never does, so the phone's address bar stays put. A route change focuses the page's h1 (D-LAY-09, canonical §13).
Motion. None. The bar never animates.
Accessibility
<header> is the banner landmark: keep it a child of the shell, outside <main>.
The home link is named by the lock-up's live text, the product name; the mark is decorative ([aria-hidden="true"]). Never "Home" or "{Product} home" (D-BCP-09, JB-1.10).
The chip is plain text; the same words name the console's drawer ([aria-label="Admin console"]).
In the console's bar the language switcher is an icon (48 × 48, 24px translate), as in a site header; it keeps its name, "Language: English", and a tooltip with the same words (D-CSN-58). The reference CSS does it inside .oa-app-shell--drawer; the markup is the full switcher.
Account control: [aria-label="Account menu, Layla Haddad"] (Global ID's design), [aria-expanded], [aria-controls]; the avatar inside is [aria-hidden="true"].
Targets: the switcher and the account control are at least 48×48; the home link is at least 48px tall (D-LAY-12).
Contrast: on-surface on surface 16.30:1 light, 14.32:1 dark; the chip's on-secondary-container on secondary-container 13.17:1 and 7.22:1.
Focus order equals the visual order: skip link, home link, switcher, account control, the rail or drawer from 768px, and the main region; below 768px the bottom bar comes last, as the last row.
The main region is <main id="main" tabindex="-1">, the target of "Skip to content" (canonical §10.3).
RTL and languages
The row follows the page direction: in Arabic the lock-up sits at the right and the controls at the left. Never force dir="ltr" on the lock-up (D-BCP-09, D-BCP-30).
The product name stays Latin inside <bdi lang="en" translate="no">; the Arabic sub-line is "الجامعة العالمية" (canonical §1.2).
Safe-area insets are physical (left and right) in both directions; everything else is logical (canonical §4.10).
In Arabic the rail or drawer column sits at the right, and the console's side sheet opens from the right (the inline start).
French at 360px: Global ID's "Console d’administration" truncates; the shorter "Administration" waits for native review (canonical §11 row 7).
Content
Part
Rule
English
Arabic
French
Home link
The product name and its sub-line, nothing else
Global ID · Global University
Global ID · الجامعة العالمية
Global ID · Global University
Context chip
1–3 words naming the area; sentence case; no verb
Admin console
لوحة الإدارة
Console d’administration
Switcher name
"Language:" and the current language in its own script
Language: English
اللغة: العربية
Langue : Français
Account control name
"Account menu," and the person's name
Account menu, Layla Haddad
(native review)
(native review)
Account list
Help in the same place on every page, then sign out
Get help · Sign out
الحصول على مساعدة (native review) · تسجيل الخروج
Obtenir de l’aide · Se déconnecter
Menu row (console, phones)
The word with the menu icon
Menu
القائمة
Menu
Do and don't
Do
Don't
Keep the bar an opaque grid row of the shell.
Make it sticky, fixed, or glass inside an app shell.
Let the chip truncate first.
Shrink, hide, or wrap the product name on phones.
Put destinations in the bar, rail, or drawer.
Add navigation links, tabs, or the main action to the top app bar.
Name the account control with the person's name.
Ship an avatar button without a name, or with a title only.
The member app shell. In a product the shell follows the skip link as a child of <body>, .oa-app-shell__main is <main id="main" tabindex="-1">, the page's title is its h1, and the --oa-app-shell-height style is left out (it sizes this documentation frame):
<!-- Member app shell: Global ID's AppShell (D-LAY-09) -->
<div class="grid h-dvh grid-cols-[minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)_auto] bg-surface text-on-surface md:grid-cols-[auto_minmax(0,1fr)] md:grid-rows-[auto_minmax(0,1fr)] md:pr-[env(safe-area-inset-right)] md:pl-[env(safe-area-inset-left)]">
<header class="flex min-h-[calc(var(--size-header-compact)+env(safe-area-inset-top))] items-center gap-3 bg-surface pt-[env(safe-area-inset-top)] pr-[env(safe-area-inset-right)] pl-[env(safe-area-inset-left)] md:col-span-2 md:min-h-[calc(var(--size-header)+env(safe-area-inset-top))] md:px-0">
<div class="flex min-w-0 flex-1 items-center gap-3 ps-4 md:ps-6">
<!-- the lock-up link (logo-lockup.md), plus shrink-0 so the chip gives way first -->
<!-- console only, the context chip: -->
<span class="inline-flex h-8 min-w-0 items-center gap-1.5 overflow-hidden rounded-chip bg-secondary-container px-3 text-label-md text-on-secondary-container">
<Icon name="admin_panel_settings" filled size={18} />
<span class="min-w-0 truncate">Admin console</span>
</span>
</div>
<div class="ms-auto flex shrink-0 items-center gap-2 pe-1 md:pe-4">
<!-- the language switcher (language-switcher.md) -->
<button type="button" aria-label="Account menu, Layla Haddad" aria-expanded="false" aria-controls="account-menu" class="relative isolate inline-flex size-12 items-center justify-center rounded-full border border-transparent 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">
<span aria-hidden="true" class="flex size-10 items-center justify-center rounded-full bg-primary-container text-label-md font-bold text-on-primary-container">LH</span>
</button>
<!-- its list: a .oa-menu__anchor wraps the button and the list (menu.md) -->
</div>
</header>
<div class="hidden md:flex md:min-h-0 md:flex-col md:overflow-y-auto md:overscroll-contain md:pb-[env(safe-area-inset-bottom)]"><!-- the navigation rail (navigation-rail.md) --></div>
<main id="main" tabindex="-1" class="min-h-0 overflow-y-auto overscroll-contain pt-1 pr-[calc(1rem+env(safe-area-inset-right))] pb-6 pl-[calc(1rem+env(safe-area-inset-left))] md:px-6 md:pt-2 md:pb-[calc(3rem+env(safe-area-inset-bottom))]">
<div class="mx-auto flex w-full max-w-page flex-col gap-stack-loose md:gap-stack-group">…</div>
</main>
<div class="md:hidden">…navigation bar…</div>
</div>
<!-- Console shell: the same, with grid-rows-[auto_auto_minmax(0,1fr)] md:grid-cols-[var(--size-nav-drawer)_minmax(0,1fr)],
no bottom bar, a 72px header (min-h-[calc(var(--size-header)+env(safe-area-inset-top))] at every width),
main pb-[calc(1.5rem+env(safe-area-inset-bottom))] below md (it meets the bottom edge), and the page frame max-w-wide.
Its tones (D-CSN-58): bg-surface-container on the shell and the header in place of bg-surface; on main,
bg-surface pt-6 md:rounded-ss-card in place of pt-1 md:pt-2; no background on the drawer. On <html>: [scrollbar-gutter:auto] (D-LAY-21). -->
The physical left and right padding classes are the safe-area insets, the one place layout uses left and right (canonical §4.10). The bottom inset goes on the row that meets the bottom edge: the bar below md, main and the navigation column from md.
React
Prop (AppShell)
Type
Default
Description
variant
'rail' | 'drawer' | 'plain'
'plain'
rail: member app (bar below md, rail from md); drawer: console (Menu row and side sheet below md, drawer from md); plain: kiosk, scanner, station
header
ReactNode
—
The TopAppBar
nav
ReactNode
—
rail: the NavigationRail; drawer: the NavigationDrawer, which also renders the Menu row and the side sheet
bar
ReactNode
—
rail only: the NavigationBar
children
ReactNode
—
The page, rendered in <main id="main" tabindex="-1"> inside the page frame
Prop (TopAppBar)
Type
Default
Description
home
ReactNode
—
The Lockup link to the product's home (/home in an app, / on public pages)
context
string
—
The chip's label ("Admin console"); leave it out for no chip
contextIcon
string
'admin_panel_settings'
The chip's 18px filled icon
compact
boolean
false
64px below md; set it only in shells with a bottom bar
children
ReactNode
—
The end controls: LanguageSwitcher, then AccountButton