QR pass
Global ID's scan pass: the person's rotating scan code on its orange panel, held up to a reader at a gate, the library, or an exam. Product component (Global ID).
When to use
- Global ID Home: the pass is Home's one main object, under the greeting (the app home pattern, canonical §11 template 3).
- Global ID's pass page and My ID's "Show scan code": the same 30-second code, at full size.
- Anything that reads a person at a station: Global Games' booth scanner and the campus stations read this pass; it is the family's one scan pass (D-CSN-44).
When not to use
| Situation | Use instead |
|---|---|
| Showing who the person is: photo, type, validity | The ID card on My ID. |
| A code on paper, in an email, or in a shared image (a guest's event pass) | Global ID's guest pass: a static code that its guest tools draw. This panel holds only a person's own rotating code. |
| Showing what the pass looks like on a marketing or help page | A device preview captioned "Illustrative product preview", with a sample code that does not scan (D-BCP-40, canonical §9). |
| Another product that wants its own code | Nothing: products scan the Global ID pass; they never draw a second one (D-CSN-44). |
| Progress of a task, a countdown anywhere else | The progress bar or spinner: the determinate ring is the pass's own (D-CSN-28). |
Anatomy
- Panel (
.oa-qr-pass): a<section>named by its visually hidden heading "Your scan code";rounded-hero(32px), a 160° gradient of the orange card-art stops,shadow-art, white text (on-card-art), padding 14px 16px 10px. - Header (
__header): the status "Ready to scan" (__status,label-md) with its 10px live dot (__dot); the Hide button at the inline end (the on-art button). - Clock warning (optional): a warning banner inside the panel, under the header.
- Viewfinder (
__frame, four__corner): 3px corners, 40px long, withradius-boxon the outside bend, 12px around the tile. - Code tile (
__code,dir="ltr"): 236px white (on-card-art), 14px padding, 28px corners (radius-28px),elevation-1; it holds the 208px code (__matrix: round modules__dots, the three finders__finderwith orange centers__eye) and the University mark at the center on a white tile (__mark). - Person (
__person): the name (title-md), the name in the other script (Arabic intitle-sm), then the type and the Global ID number (__meta,body-md; the number in monocode-sm, in<bdi dir="ltr">). - Bottom bar (
__bar): 48px high, a hairline of the panel's ink at 22% above it; the 22px countdown ring (__ring) with "New code every 30 seconds" (__caption); the standalone link "My ID card" with a mirroredchevron_right.
Variants
| Variant | Use for | Key tokens |
|---|---|---|
| Ready (default) | The working pass | --color-cat-orange-from 0% → --color-cat-orange-mid 60% → 100% at 160°; --color-on-card-art; --shadow-art; --radius-hero |
Folded (.oa-qr-pass--folded) |
The person hid the pass on this device | --color-primary-container / --color-on-primary-container; the 48px tile --color-primary / --color-on-primary; Show is the filled button |
Loading (aria-busy="true") |
Until the code is made | the panel, qr_code_2 at --size-icon-xl, body-lg at 500 |
Failed (__problem) |
The code could not be made | filled error at --size-icon-3xl, title-sm, Try again (on-art) |
The pass has no dark variant: the panel and the code are card art, identical in both themes (canonical §2.11).
Family products only. Its on-art Hide and Try again buttons turn white on white under an endorsed accent (D-ARC-12).
Sizes
One size. The panel fills its column; everything inside keeps its size, because the code must stay big enough to read.
| Part | Size | Padding | Type style | Icon size |
|---|---|---|---|---|
| Panel | the column's width; the viewfinder needs 260px | 14px 16px 10px (--space-3-5, --space-4, --space-2-5) |
status label-md |
— |
| Live dot | 10px | — | — | — |
| Code tile | 236 × 236px (component constant) | 14px | — | — |
| Code | 208px, error correction Q | — | — | the mark tile 18% of the code (37px), 12px corners (--radius-12px) |
| Person | — | — | title-md; Arabic title-sm; meta body-md, number code-sm |
— |
| Bottom bar | 48px or more (--size-touch-target) |
4px above | caption body-sm at 500 |
ring 22px; chevron 20px (--size-icon-md) |
| Folded bar | 48px tile (--size-touch-target), 32px corners |
14px; 16px at the inline start | title title-sm, body body-md |
qr_code_2 28px (--size-icon-xl) |
| Loading | 112px high (--space-28) |
24px 16px | body-lg at 500 |
28px |
Tokens
| Part | Property | Token |
|---|---|---|
| Panel | background | linear-gradient(160deg, var(--color-cat-orange-from) 0%, var(--color-cat-orange-mid) 60%, var(--color-cat-orange-mid) 100%) over --color-cat-orange-from |
| Panel | corners, shadow, edge | --radius-hero (32px), --shadow-art, 1px transparent |
| Panel | text, icons, viewfinder, ring | --color-on-card-art |
| Panel | focus ring, links | --color-focus-ring and --oa-link re-pointed to --color-on-card-art (canonical §2.8) |
| Live dot | fill, halo | currentColor (--color-on-card-art); --animate-live (--duration-loop-status, --ease-emphasized) |
| Corners | motion | --animate-breathe (--duration-loop-status) |
| Code tile | fill, corners, shadow | --color-on-card-art, --radius-28px, --shadow-elevation-1 |
| Code | modules, finders, centers | --color-cat-orange-from (modules and finders), --color-cat-orange-to (finder centers) |
| Number | family | --font-mono, code-sm |
| Bottom bar | hairline | currentColor at 22% |
| Ring | arc | 2.5px stroke, track at 30%; the dash offset moves over --duration-medium-2 --ease-emphasized; script writes --oa-qr-pass-used (0 to 1) |
| Hide, Try again | button | .oa-btn--on-art: --color-on-card-art fill, --color-on-primary label, --shadow-elevation-1 |
| Folded bar | fill, ink, tile | --color-primary-container, --color-on-primary-container; tile --color-primary / --color-on-primary, --radius-box |
States
| State | What changes |
|---|---|
| Ready | "Ready to scan" with the dot pulsing; the corners breathe; the ring drains over the 30 seconds of one code. |
| New code | Every 30 seconds the code changes and the ring fills again; nothing else on the panel moves. |
| Clock off | The warning banner appears under the header (role="status"); the code still shows. |
| Hover, pressed (Hide, Try again, My ID card) | The button's layer at --opacity-state-hover (8%) and --opacity-state-pressed (12%) over --duration-short-3. |
| Focus-visible | The family ring, 3px, 2px outside, in --color-on-card-art on the panel (white on the orange stops is 5.85:1 or more). |
| Folded | The panel becomes the folded bar; focus moves to Show. On a pass narrower than the text needs (a 320px window), Show wraps under the text at the inline end, so the text keeps at least 96px and the title stays on one or two lines. |
| Loading | aria-busy="true", qr_code_2, and "Getting your scan code…"; no ring, no corners. |
| Failed | The words "Your scan code couldn’t be made." (role="alert") and Try again on the panel, in place of the status, the code, and the bar: never a blank tile with a ring running. |
| Disabled | None: a pass that cannot work is replaced by the screen that says why (turn it on, add a passkey, contact the ID office). |
Behavior
- Rotation. The phone makes the code, a new one every 30 seconds, with or without signal. Script swaps the code at each 30-second boundary and writes
--oa-qr-pass-usedonce a second (0 at a new code, 1 at its end); the ring's arc follows over--duration-medium-2on--ease-emphasized(canonical §7.3). - Hide and Show. Hide folds the pass and remembers that on this device; Show unfolds it and puts focus on the panel's first control. The fold is the person's privacy choice in a queue, not a security feature: the code is rotating and personal either way.
- Clock. When the phone's clock is off, the code would not verify: the banner asks for automatic time, and the code stays.
- Reduced motion. The dot and the corners stand still; the ring jumps from second to second; the words "Ready to scan" and "New code every 30 seconds" stay, so nothing depends on the motion (canonical §7.7).
- Responsive. The same panel on every width; on Home it sits in the content column, under the greeting, before the task tiles.
- Print. The panel prints without its art shadow; the pass is a screen object and is not meant to be printed.
Accessibility
- Element and name. A
<section>labeled by its visually hidden h2 or h3 "Your scan code" (the pattern decides the level). The code is an SVG withrole="img"named "Your Global ID scan code"; the dot, the corners, the ring, and the mark tile are decorative (aria-hidden="true",alt=""). - Status. "Ready to scan" is text, not the dot. The countdown is not announced each second; "New code every 30 seconds" says what the ring shows.
- Keyboard. Tab reaches Hide, then "My ID card"; in the folded bar, Show. Enter and Space activate the buttons.
- Target size. Hide, Show, and Try again are 48px buttons (md,
--size-button-md); "My ID card" is a 48px standalone link in a 48px bar (D-LAY-12). - Contrast. White on the orange stops is 5.85:1 or more for every text on the panel, the 12px caption included; the white focus ring is 5.85:1 or more against the stops. On the folded bar the text is
on-primary-containeronprimary-container. - Not by color alone. Ready, loading, failed, and folded each have their words.
- Reduced motion. See Behavior.
RTL and languages
- The panel mirrors: the status at the inline start, Hide at the inline end, the ring and caption at the start of the bar, the link at the end with its chevron mirrored (
.oa-icon--mirror, canonical §8.3). - The code never mirrors: its tile carries
dir="ltr", and so does the Global ID number (<bdi dir="ltr">). - On an Arabic page the Arabic name comes first (
title-sm, Noto Kufi Arabic) and the English name second, withlang="en" dir="ltr". - French "Nouveau code toutes les 30 secondes" and "Ma carte ID" do not share one line at 360px: the bar wraps, the link moves under the caption at the inline end, and nothing is cut.
Content
| Key | English | Arabic | French |
|---|---|---|---|
| The section's name | Your scan code | رمز المسح الخاص بك | Votre code à scanner |
| The code's name | Your Global ID scan code | رمز المسح الخاص بك في Global ID | Votre code à scanner Global ID |
| Status | Ready to scan | جاهز للمسح | Prêt à scanner |
| Hide | Hide | إخفاء | Masquer |
| Caption | New code every 30 seconds | رمز جديد كل 30 ثانية | Nouveau code toutes les 30 secondes |
| Link | My ID card | بطاقة هويتي | Ma carte ID |
| Clock | Your phone’s clock is off. Set it to automatic time. | ساعة هاتفك غير مضبوطة. اضبطها على الوقت التلقائي. | L’horloge de votre téléphone n’est pas à l’heure. Réglez-la sur l’heure automatique. |
| Folded title | Scan code hidden | رمز المسح مخفي | Code à scanner masqué |
| Folded line | Show it when you reach a gate. | أظهره عندما تصل إلى البوابة. | Affichez-le en arrivant à un accès. |
| Show | Show | إظهار | Afficher |
| Loading | Getting your scan code… | جارٍ تحضير رمز المسح… | Préparation de votre code à scanner… |
| Failed | Your scan code couldn’t be made. | تعذّر إنشاء رمز المسح. | Votre code à scanner n’a pas pu être créé. |
| Retry | Try again | إعادة المحاولة (native review) | Réessayer |
- The meta line is the type's word and the number: "Student · GU-25-000123" (the type words are on the ID card page). The number is never reformatted.
- Action labels come from the family glossary, so "Try again" is "إعادة المحاولة" in Arabic, a verbal noun like every Arabic action label (canonical §12.3, §12.6).
- Digits for every count ("30 seconds"); curly apostrophes; the ellipsis character (D-BCP-17, D-BCP-19).
Do and don't
| Do | Don't |
|---|---|
| Keep the code on its white tile, left to right, with the mark at the center. | Mirror the code, recolor its modules, or put it on the gradient. |
| Say "Ready to scan" and "New code every 30 seconds" in words. | Let the pulsing dot or the ring carry the state alone. |
| Show the words and Try again when the code fails. | Leave an empty tile with the ring still draining. |
| Use the on-art Hide button on the panel. | Put a filled orange button on the orange panel. |
| Keep the pass on Global ID. | Draw a pass in another product, or email a code. |
Code
HTML (reference CSS)
The ready pass (sample person; the code does not scan):
<section class="oa-qr-pass" aria-labelledby="pr-pass-title" style="--oa-qr-pass-used: 0.4">
<h3 class="oa-visually-hidden" id="pr-pass-title">Your scan code</h3>
<div class="oa-qr-pass__header">
<p class="oa-qr-pass__status"><span class="oa-qr-pass__dot" aria-hidden="true"></span>Ready to scan</p>
<button class="oa-btn oa-btn--on-art" type="button"><span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">visibility_off</span><span class="oa-btn__label">Hide</span></button>
</div>
<div class="oa-qr-pass__frame">
<span class="oa-qr-pass__corner" aria-hidden="true"></span>
<span class="oa-qr-pass__corner" aria-hidden="true"></span>
<span class="oa-qr-pass__corner" aria-hidden="true"></span>
<span class="oa-qr-pass__corner" aria-hidden="true"></span>
<div class="oa-qr-pass__code" dir="ltr">
<svg class="oa-qr-pass__matrix" viewBox="0 0 25 25" role="img" aria-label="Your Global ID scan code"><path class="oa-qr-pass__dots" d="M10.5 0.5h0M12.5 0.5h0M13.5 0.5h0M15.5 0.5h0M15.5 1.5h0M12.5 2.5h0M13.5 2.5h0M15.5 2.5h0M10.5 3.5h0M11.5 3.5h0M13.5 3.5h0M8.5 4.5h0M9.5 4.5h0M12.5 4.5h0M15.5 4.5h0M16.5 4.5h0M10.5 5.5h0M12.5 5.5h0M13.5 5.5h0M15.5 5.5h0M8.5 6.5h0M10.5 6.5h0M12.5 6.5h0M14.5 6.5h0M16.5 6.5h0M10.5 7.5h0M12.5 7.5h0M13.5 7.5h0M14.5 7.5h0M15.5 7.5h0M16.5 7.5h0M0.5 8.5h0M1.5 8.5h0M2.5 8.5h0M4.5 8.5h0M6.5 8.5h0M7.5 8.5h0M11.5 8.5h0M14.5 8.5h0M15.5 8.5h0M17.5 8.5h0M19.5 8.5h0M20.5 8.5h0M22.5 8.5h0M0.5 9.5h0M2.5 9.5h0M7.5 9.5h0M8.5 9.5h0M18.5 9.5h0M19.5 9.5h0M20.5 9.5h0M0.5 10.5h0M1.5 10.5h0M3.5 10.5h0M6.5 10.5h0M8.5 10.5h0M1.5 11.5h0M17.5 11.5h0M18.5 11.5h0M21.5 11.5h0M23.5 11.5h0M1.5 12.5h0M2.5 12.5h0M6.5 12.5h0M16.5 12.5h0M17.5 12.5h0M20.5 12.5h0M21.5 12.5h0M22.5 12.5h0M0.5 13.5h0M2.5 13.5h0M5.5 13.5h0M20.5 13.5h0M23.5 13.5h0M24.5 13.5h0M0.5 14.5h0M3.5 14.5h0M6.5 14.5h0M7.5 14.5h0M8.5 14.5h0M17.5 14.5h0M18.5 14.5h0M20.5 14.5h0M0.5 15.5h0M1.5 15.5h0M2.5 15.5h0M4.5 15.5h0M19.5 15.5h0M21.5 15.5h0M3.5 16.5h0M6.5 16.5h0M8.5 16.5h0M9.5 16.5h0M12.5 16.5h0M14.5 16.5h0M16.5 16.5h0M17.5 16.5h0M18.5 16.5h0M19.5 16.5h0M20.5 16.5h0M21.5 16.5h0M23.5 16.5h0M11.5 17.5h0M12.5 17.5h0M15.5 17.5h0M16.5 17.5h0M20.5 17.5h0M24.5 17.5h0M8.5 18.5h0M10.5 18.5h0M12.5 18.5h0M14.5 18.5h0M16.5 18.5h0M18.5 18.5h0M20.5 18.5h0M21.5 18.5h0M23.5 18.5h0M9.5 19.5h0M10.5 19.5h0M16.5 19.5h0M20.5 19.5h0M22.5 19.5h0M23.5 19.5h0M9.5 20.5h0M11.5 20.5h0M13.5 20.5h0M16.5 20.5h0M17.5 20.5h0M18.5 20.5h0M19.5 20.5h0M20.5 20.5h0M21.5 20.5h0M22.5 20.5h0M10.5 21.5h0M14.5 21.5h0M15.5 21.5h0M16.5 21.5h0M18.5 21.5h0M19.5 21.5h0M22.5 21.5h0M8.5 22.5h0M15.5 22.5h0M16.5 22.5h0M17.5 22.5h0M19.5 22.5h0M21.5 22.5h0M23.5 22.5h0M8.5 23.5h0M10.5 23.5h0M11.5 23.5h0M13.5 23.5h0M14.5 23.5h0M16.5 23.5h0M18.5 23.5h0M20.5 23.5h0M11.5 24.5h0M13.5 24.5h0M14.5 24.5h0M18.5 24.5h0M19.5 24.5h0M20.5 24.5h0M22.5 24.5h0M23.5 24.5h0M24.5 24.5h0"/><rect class="oa-qr-pass__finder" x="0.5" y="0.5" width="6" height="6" rx="1.6"/><rect class="oa-qr-pass__eye" x="2" y="2" width="3" height="3" rx="0.8"/><rect class="oa-qr-pass__finder" x="18.5" y="0.5" width="6" height="6" rx="1.6"/><rect class="oa-qr-pass__eye" x="20" y="2" width="3" height="3" rx="0.8"/><rect class="oa-qr-pass__finder" x="0.5" y="18.5" width="6" height="6" rx="1.6"/><rect class="oa-qr-pass__eye" x="2" y="20" width="3" height="3" rx="0.8"/></svg>
<img class="oa-qr-pass__mark" src="../assets/logos/global-university-mark.svg" alt="" width="32" height="32">
</div>
</div>
<div class="oa-qr-pass__person">
<p class="oa-qr-pass__name">Lina Haddad</p>
<p class="oa-qr-pass__name" lang="ar" dir="rtl">لينا حداد</p>
<p class="oa-qr-pass__meta">Student · <bdi dir="ltr" translate="no">GU-25-000123</bdi></p>
</div>
<div class="oa-qr-pass__bar">
<p class="oa-qr-pass__caption"><svg class="oa-qr-pass__ring" viewBox="0 0 22 22" aria-hidden="true"><circle cx="11" cy="11" r="9"/><circle cx="11" cy="11" r="9"/></svg>New code every 30 seconds</p>
<a class="oa-link oa-link--standalone" href="#pr-my-id"><span class="oa-link__label">My ID card</span><span class="oa-icon oa-icon--md oa-icon--mirror oa-link__icon" aria-hidden="true" translate="no">chevron_right</span></a>
</div>
</section>The clock warning, inside the panel under the header:
<div class="oa-banner oa-banner--warning" role="status">
<span class="oa-icon oa-icon--md oa-icon--filled oa-banner__icon" aria-hidden="true" translate="no">schedule</span>
<div class="oa-banner__content">
<p class="oa-banner__message">Your phone’s clock is off. Set it to automatic time.</p>
</div>
</div>Folded, loading, and failed:
<section class="oa-qr-pass oa-qr-pass--folded" aria-label="Scan code hidden">
<span class="oa-qr-pass__tile" aria-hidden="true"><span class="oa-icon" translate="no">qr_code_2</span></span>
<div class="oa-qr-pass__text">
<p class="oa-qr-pass__title">Scan code hidden</p>
<p class="oa-qr-pass__body">Show it when you reach a gate.</p>
</div>
<button class="oa-btn oa-btn--filled" type="button"><span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">visibility</span><span class="oa-btn__label">Show</span></button>
</section><section class="oa-qr-pass" aria-busy="true" aria-label="Your scan code">
<span class="oa-icon oa-icon--xl" aria-hidden="true" translate="no">qr_code_2</span>
<span>Getting your scan code…</span>
</section><section class="oa-qr-pass" aria-labelledby="pr-pass-failed-title">
<h3 class="oa-visually-hidden" id="pr-pass-failed-title">Your scan code</h3>
<div class="oa-qr-pass__problem">
<span class="oa-icon oa-icon--filled" aria-hidden="true" translate="no">error</span>
<p class="oa-qr-pass__problem-text" role="alert">Your scan code couldn’t be made.</p>
<button class="oa-btn oa-btn--on-art" type="button"><span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">refresh</span><span class="oa-btn__label">Try again</span></button>
</div>
</section>Asset paths are relative to reference/. Script contract: write --oa-qr-pass-used once a second, swap the code every 30 seconds, toggle the folded bar and move focus, set aria-busy while the code is being made.
Tailwind CSS v4
The panel and the tile in utilities; the viewfinder corners and the ring stay in the component's stylesheet (port them from reference/css/product.css):
<section class="relative isolate flex flex-col items-center gap-3.5 overflow-hidden rounded-hero border border-transparent bg-cat-orange-from bg-linear-160 from-cat-orange-from via-cat-orange-mid via-60% to-cat-orange-mid px-4 pt-3.5 pb-2.5 text-on-card-art shadow-art" aria-labelledby="pass-title">
<h2 class="sr-only" id="pass-title">Your scan code</h2>
<div class="flex flex-wrap items-center gap-2 self-stretch">
<p class="inline-flex min-h-8 items-center gap-2 text-label-md"><span class="size-2.5 rounded-full bg-current animate-live" aria-hidden="true"></span>Ready to scan</p>
<!-- Hide: the on-art button, ms-auto -->
</div>
<div class="relative p-3"><!-- four corners, animate-breathe -->
<div class="grid size-59 place-items-center rounded-28px border border-transparent bg-on-card-art p-3.5 text-cat-orange-from shadow-elevation-1" dir="ltr">
<!-- the 208px code and the mark tile on one grid cell -->
</div>
</div>
<p class="text-title-md">Lina Haddad</p>
<p class="text-body-md">Student · <bdi class="font-mono text-code-sm" dir="ltr">GU-25-000123</bdi></p>
<div class="relative flex min-h-12 flex-wrap items-center justify-between gap-2 self-stretch pt-1">
<p class="inline-flex items-center gap-2 text-body-sm font-medium"><!-- the ring -->New code every 30 seconds</p>
<!-- My ID card: the standalone link -->
</div>
</section>Folded: flex-row flex-wrap gap-3.5 p-3.5 ps-4 bg-primary-container bg-none text-on-primary-container shadow-none in place of the panel's flex-col, px-4 pt-3.5 pb-2.5, colors, and shadow; the tile size-12 rounded-box bg-primary text-on-primary.
React
| Prop | Type | Default | Description |
|---|---|---|---|
state |
"ready" | "loading" | "failed" | "folded" |
— | What the panel shows. |
code |
string |
— | The current payload; the component draws the SVG (error correction Q, the mark at the center). |
used |
number |
0 |
Share of the current 30 seconds used, 0 to 1; drives the ring. |
person |
{ name: string; otherName?: string; typeLabel: string; gidNumber: string } |
— | The person block; otherName is the name in the other script. |
clockOff |
boolean |
false |
Shows the clock warning. |
onHide / onShow |
() => void |
— | Fold and unfold; the page remembers the choice on this device. |
onRetry |
() => void |
— | Try again after a failure. |
cardHref |
string |
— | The "My ID card" link. |
headingLevel |
2 | 3 |
2 |
The level of the hidden "Your scan code" heading. |
<QrPass
state={folded ? 'folded' : pass.status}
code={pass.payload}
used={pass.secondsUsed / 30}
person={{ name: me.name, otherName: me.nameAr, typeLabel: t(`personType.${me.type}`), gidNumber: me.gidNumber }}
clockOff={pass.clockOff}
onHide={() => setFolded(true)}
onShow={() => setFolded(false)}
onRetry={pass.retry}
cardHref="/id"
/>