Skip to content
OAIT Design System

Design system / Components

ID card

Global ID's credential: a person's University card, English on the front and Arabic on the back, drawn in the colors of their person type. Product component (Global ID).

When to use

  • My ID: the person's own card, the one main object of that screen, flipped by a tap (canonical §15).
  • The ID office's print page: both faces flat, as they print on a CR80 card (@page gid-card, D-LAY-19).
  • A person record in the admin console, where an identity admin checks what the person's card shows.

When not to use

Situation Use instead
A landing hero, an app switcher, an OG image, any marketing page The passport card, with a sample person (data-person-type) when a person is shown. Marketing never draws the real credential (D-BCP-38).
Holding the code up to a reader at a gate, the library, or an exam The QR pass on Home, or "Show scan code" on My ID (the same rotating code).
Showing someone's type in a list, a table, or a record The type chip: a status chip on cat-<hue>-container with the type's icon and word (D-COL-18).
Any product other than Global ID Nothing: the credential is Global ID's illustration slot (D-BCP-39). Other products may show a person's type color beside that person.

Anatomy

  1. Card (.oa-id-card): an inline-size container; every interior size is a cqw of its width. Carries data-person-type and data-side="en|ar".
  2. Inner box (.oa-id-card__inner): aspect 1.586 (CR80), turned in 3D under perspective(1600px).
  3. Front face (.oa-id-card__face, lang="en" dir="ltr" on every page): the person type's 135° gradient, 6cqw padding, three rows.
    1. Top row: the white 9cqw University tile (2.4cqw corners, elevation-1, the mark at 6.2cqw); the eyebrow "Global University" (2.5cqw, uppercase by CSS) and its line "Beirut · Lebanon" (2.1cqw, 80%); contactless (5cqw, 80%); the gold chip (8.5 × 6.5cqw, 1.4cqw corners).
    2. Middle row: the photo tile (19cqw, 3cqw corners: the approved photo or the initials); the name (6.6cqw, 700, −0.02em); the type pill (2.8cqw 600, the type's filled icon and word); the affiliation lines (unit 2.5cqw, program 2.3cqw).
    3. Bottom row: two facts, each a label (2.2cqw 600, uppercase) over a mono value (3.4cqw 500, +0.06em, in <bdi dir="ltr">); the 12cqw seal at the inline end.
  4. Back face (.oa-id-card__face--back, lang="ar" dir="rtl"): the type's container tint and ink; the tile, "الجامعة العالمية" and its line, the kind pill "بطاقة هوية جامعية"; the Arabic name (Kufi 800), the type pill on the type's dark color, the affiliation; the 23cqw scan-code slot; two facts and the "if found" line.
  5. Flip button (.oa-id-card__flip): one transparent button laid over the card, named by the side it would show.
  6. Art layers: guilloche rings and the band of light (the faces' ::before and ::after), decorative.

Variants

Variant Use for Key tokens
Student (default), data-person-type="student" Students cat-orange-from / -mid / -to; back cat-orange-container, on-cat-orange-container; icon school
Faculty Faculty members cat-blue-*; icon menu_book
Staff Staff cat-green-*; icon work
Administrator Administrators cat-plum-*; icon admin_panel_settings
Security Security officers cat-teal-*; icon shield_person
Guest Guests (with an end date) cat-indigo-*; icon confirmation_number
Alumni Alumni cat-burgundy-*; icon workspace_premium
Contractor Contractors (with an end date) cat-slate-*; icon construction
Flippable (default) My ID: front and back in one card, turned by the flip button data-side, --duration-extra-long-3, --ease-spring
Flat (.oa-id-card--flat) One face facing the page, read in full: the print page and side-by-side views no flip button; in print a CR80 page per face

The person-type palette binds the eight categorical hues to Global ID's types; any product that shows a type uses the same hue, always with the type's word and icon (D-COL-18, canonical §2.11).

Sizes

The card has one shape at every size: it is as wide as its column and everything inside scales with that width (cqw). Global ID's My ID caps the card at 600px. The card sets text-size-adjust: 100%, so a phone's text scaling does not enlarge the art's text inside the fixed card; the name, type, and number are repeated as text beside it, which does scale (D-APP-18).

Card width Height Padding (6cqw) Name (6.6cqw) Values (3.4cqw) Labels (2.2cqw) Icons
358px (a 390px phone, 16px gutters) 226px 21.5px 23.6px 12.2px 7.9px contactless 5cqw (17.9px), type icon 3.2cqw
460px 290px 27.6px 30.4px 15.6px 10.1px contactless 23px
600px (My ID cap) 378px 36px 39.6px 20.4px 13.2px contactless 30px
85.6 × 54mm (printed CR80) 54mm 5.1mm 5.6mm 2.9mm 1.9mm contactless 4.3mm

The values reach 12px from a 353px card; labels and the eyebrow stay below 12px on phones: they are card art, which keeps its cqw sizes (canonical §3.6, D-TYP-13), and the faces are also read as text by screen readers. The person's name, type, and Global ID number also show at reading size on the QR pass.

Tokens

Part Property Token
Front background linear-gradient(135deg, var(--color-cat-<hue>-from) 0%, var(--color-cat-<hue>-mid) 58%, var(--color-cat-<hue>-to) 100%) through --oa-id-card-from, -mid, -to (theme-invariant)
Front text and icons --color-on-card-art (white)
Back background, text --color-cat-<hue>-container, --color-on-cat-<hue>-container through --oa-id-card-back, -back-ink (they follow the theme)
Faces corners, shadow, edge 5.5cqw (component constant, D-SEM-06), --shadow-art, 1px transparent edge
Small text on the front backing --oa-id-card-from at 40% behind the type pill, the affiliation, and the fact labels
University tile, seal disc, scan slot fill --color-on-card-art; tile shadow --shadow-elevation-1
Gold chip fill, edge --color-passport-jobs-from / -mid / -to; edge --color-passport-jobs-to
Seal ring fill conic-gradient of --color-cat-orange-to, --color-passport-jobs-from, --color-cat-green-to, --color-cat-blue-to, --color-cat-plum-to: the closest theme-invariant tokens to the family seal, whose light tints (gold, mint, blue, peach) have no art tokens yet (token request)
Back type pill fill, text --oa-id-card-from, --color-on-card-art
Fact values family --font-mono, 500, +0.06em
Flip motion transform over --duration-extra-long-3 (900ms), --ease-spring
Sheen motion --animate-sheen, one iteration (animation-iteration-count: 1)
Flip button state layer currentColor (the side's ink) at --opacity-state-hover / --opacity-state-pressed, --duration-short-3, --ease-standard
Flip button focus the page ring: --size-focus-ring solid --color-focus-ring, --size-focus-offset outside the card's corners

States

State What changes
Enabled (front showing) data-side="en"; the back face carries aria-hidden="true". The sheen crosses once when the card appears.
Hover (mouse) The flip button's 8% layer of the side's ink over the card (--opacity-state-hover), fading over --duration-short-3.
Focus-visible The family ring, 3px in --color-focus-ring, 2px outside the card, following its 5.5cqw corners. The ring is drawn on the page ground, so it stays the page's primary-ink.
Pressed The 12% layer (--opacity-state-pressed), at once.
Turned over data-side="ar": the inner box turns 180°; the front takes aria-hidden="true", the back loses it; the flip button reads "Show the English side"; the sheen crosses the back once.
Disabled None: the card is never disabled. A card that cannot be shown is replaced by a message on the page.
Loading None on the card itself; the scan-code slot shows a faint qr_code_2 until the pass is ready (nothing anyone could take for a code).
Printed Square faces, no shadow, no sheen, backgrounds printed, one face per page.

Behavior

  • Flip. A click, tap, Enter, or Space on the flip button turns the card: script toggles data-side between en and ar and, in the same task, swaps aria-hidden on the two faces and the button's name. The turn is a 900ms spring (--duration-extra-long-3, --ease-spring) under perspective(1600px). Never wait for transitionend: the side is state, so screen readers get the new face at once (canonical §7.6, D-SEM-20, D-SEM-21).
  • The side switch. My ID also offers a segmented button "English | العربية" named "Side of the card"; it sets the same data-side. A one-line hint above the card says what a tap does ("Tap the card to see the Arabic side").
  • Which side first. My ID opens on the English front in every page language; the hint above the card and the switch below it say how to turn it. The side is page state: it is not stored, so the next visit opens on the front again (Global ID today).
  • Calm. On functional screens the card does not float and its seal does not turn; the sheen crosses once on appearing and once after each flip. The reference CSS gives the shown face's ::after one oa-sheen iteration, so each flip runs it again.
  • Reduced motion. The faces swap at once and the sheen rests off the card; every state still changes (canonical §7.7).
  • The scan-code slot. On My ID the back's slot holds the rotating code of the QR pass, the same 30-second code; without a working pass it shows a faint qr_code_2 at 15%.
  • Responsive. The card fills its column (up to 600px on My ID) and keeps its shape; below 768px My ID shows the hint above the card, from 768px the card comes first on a tonal panel (Global ID today).
  • Print. Each flat face prints on its own CR80 page (@page gid-card { size: 85.6mm 54mm; margin: 0 }), with square corners: the die-cut makes the 3.18mm corner (3.7cqw only if the printer cannot print to the edge, D-ARC-31). Global ID's other print surfaces, A4 sheets with 10mm margins and B4, are pages of their own that hold several faces (canonical §15, D-LAY-19).

Accessibility

  • Element and name. The faces are text, read in order; the hidden face carries aria-hidden="true". The flip is a <button type="button"> laid over the card, not wrapped around it (a button's content is presentational), named by the side it would show: "Show the Arabic side" / "Show the English side". Its name changes; it is not a toggle with aria-pressed.
  • Decoration. The tile, contactless, chip, seal, initials, and art layers are aria-hidden or alt="": the name and the university's name are written next to them.
  • Keyboard. Tab reaches the flip button; Enter and Space turn the card; focus stays on the button.
  • Target size. The whole card is the target.
  • Contrast. White on every type's -mid stop is 5.85:1 or more, and still 4.8:1 three quarters across the student card, where the name ends; small text sits on the from-color backing at 40% (5.38:1 or more even over the lightest stop of every type); the name is large text from a 364px card (24px). The back's ink on its tint is 11.5:1 or more (light) and 7.3:1 or more (dark). Measured: white on a white/20 pill falls to 3.97:1 on the student card, so the pills take the backing too.
  • Not by color alone. The type is always its word and its icon, never the gradient alone (D-COL-18).
  • Forced colors. The faces keep a transparent 1px edge, so the card keeps its outline (ID-1.09).
  • Reduced motion. See Behavior; nothing loops on functional screens.

RTL and languages

  • The front is English and left to right on every page (lang="en" dir="ltr"), the back Arabic and right to left (lang="ar" dir="rtl"), like the two sides of a printed card: never mirror a face (canonical §14.2).
  • Numbers, the Global ID number, and dates sit in <bdi dir="ltr"> on both faces; digits are Western (D-TYP-12, D-BCP-30).
  • The back may set names in Noto Kufi Arabic 800, the only 800 in the family (canonical §3.3).
  • French pages show the same two faces; only the page around the card is French ("Afficher la face arabe").
  • The card's own wording is fixed in the component, not in the message catalogs; the Arabic is listed for native review with the rest of the card wording.

Content

Front (English) Back (Arabic)
Global University (uppercase by CSS) الجامعة العالمية
Beirut · Lebanon بيروت · لبنان
— بطاقة هوية جامعية (the kind pill)
Global ID (the number's label) رقم الهوية الجامعية
Valid until صالحة حتى
— إن وُجدت هذه البطاقة، يُرجى إعادتها إلى مكتب الهوية
Type English Arabic French
student Student طالب Étudiant
faculty Faculty عضو هيئة التدريس Enseignant
staff Staff موظف Personnel
administrator Administrator إداري Administrateur
security Security أمن Sécurité
guest Guest ضيف Invité
alumni Alumni خريج Diplômé
contractor Contractor متعاقد Prestataire
  • Values. The Global ID number GU-YY-NNNNNN in mono, never reformatted (GU-25-000123). Validity "MM / YYYY" (08 / 2030), "DD / MM / YYYY" for guests and contractors, "Lifetime" for alumni with no end, a dash when no end was set; card validity is the one place "MM / YYYY" appears (canonical §14.3). In copy write "Global ID number"; the short label belongs to card art (canonical §1.2).
  • Page strings. "Tap the card to see the Arabic side" / "اضغط على البطاقة لعرض الوجه العربي" / "Touchez la carte pour voir la face arabe"; flip names "Show the Arabic side" / "عرض الوجه العربي" / "Afficher la face arabe" and "Show the English side" / "عرض الوجه الإنجليزي" / "Afficher la face anglaise"; "Side of the card" / "وجه البطاقة" / "Face de la carte"; "Show scan code" / "عرض رمز المسح" / "Afficher le code à scanner".
  • Samples. Sample people are fictional, labeled "Sample" where they show, and numbered from 2025, a year no number was issued (GU-25-000123, canonical §12.5). They show initials in the photo tile: the family uses no stock or generated photos of people (canonical §9).

Do and don't

Do Don't
Keep the front English and left to right inside an Arabic page. Mirror the front, or translate the card's words into the page language.
Show the type by its gradient, its icon, and its word. Let the gradient alone say the type.
Put small text on the from-color backing. Fade labels to 75% white on the bare gradient (the light end of the student card is 3.23:1).
Turn the card with data-side and swap aria-hidden at once. Wait for transitionend, or leave both faces readable.
Keep My ID calm: one sheen on appearing and after each flip. Float the card or turn its seal on a functional screen (unless the client declines D-SEM-18, with the Pause control).
Draw sample people on marketing pages with the passport card. Put the credential, with a real person's data, on a landing page.

Code

HTML (reference CSS)

The flippable card, front showing (sample data):

<div class="oa-id-card" data-person-type="student" data-side="en">
  <div class="oa-id-card__inner">
    <div class="oa-id-card__face" lang="en" dir="ltr">
      <div class="oa-id-card__top">
        <span class="oa-id-card__tile"><img src="../assets/logos/global-university-mark.svg" alt="" width="24" height="24"></span>
        <span class="oa-id-card__brand">
          <span class="oa-id-card__eyebrow">Global University</span>
          <span class="oa-id-card__place">Beirut · Lebanon</span>
        </span>
        <span class="oa-icon oa-id-card__contactless" aria-hidden="true" translate="no">contactless</span>
        <span class="oa-id-card__chip" aria-hidden="true"></span>
      </div>
      <div class="oa-id-card__middle">
        <span class="oa-id-card__photo" aria-hidden="true">LH</span>
        <span class="oa-id-card__identity">
          <span class="oa-id-card__name">Lina Haddad</span>
          <span class="oa-id-card__role"><span class="oa-icon oa-icon--filled" aria-hidden="true" translate="no">school</span>Student</span>
          <span class="oa-id-card__affiliation">
            <span class="oa-id-card__unit">Faculty of Engineering</span>
            <span class="oa-id-card__program">BSc Computer Science · Year 1</span>
          </span>
        </span>
      </div>
      <div class="oa-id-card__bottom">
        <span class="oa-id-card__fact"><span class="oa-id-card__label">Global ID</span><bdi class="oa-id-card__number" dir="ltr" translate="no">GU-25-000123</bdi></span>
        <span class="oa-id-card__fact"><span class="oa-id-card__label">Valid until</span><bdi class="oa-id-card__number" dir="ltr">08 / 2030</bdi></span>
        <span class="oa-id-card__seal" aria-hidden="true"><img src="../assets/logos/global-university-mark.svg" alt="" width="32" height="32"></span>
      </div>
    </div>
    <div class="oa-id-card__face oa-id-card__face--back" lang="ar" dir="rtl" aria-hidden="true">
      <div class="oa-id-card__top">
        <span class="oa-id-card__tile"><img src="../assets/logos/global-university-mark.svg" alt="" width="24" height="24"></span>
        <span class="oa-id-card__brand">
          <span class="oa-id-card__eyebrow">الجامعة العالمية</span>
          <span class="oa-id-card__place">بيروت · لبنان</span>
        </span>
        <span class="oa-id-card__kind">بطاقة هوية جامعية</span>
      </div>
      <div class="oa-id-card__middle">
        <span class="oa-id-card__identity">
          <span class="oa-id-card__name">لينا حداد</span>
          <span class="oa-id-card__role"><span class="oa-icon oa-icon--filled" aria-hidden="true" translate="no">school</span>طالب</span>
          <span class="oa-id-card__affiliation">
            <span class="oa-id-card__unit">كلية الهندسة</span>
            <span class="oa-id-card__program">بكالوريوس علوم الحاسوب · السنة الأولى</span>
          </span>
        </span>
        <span class="oa-id-card__code"><span class="oa-icon" aria-hidden="true" translate="no">qr_code_2</span></span>
      </div>
      <div class="oa-id-card__bottom">
        <span class="oa-id-card__fact"><span class="oa-id-card__label">رقم الهوية الجامعية</span><bdi class="oa-id-card__number" dir="ltr" translate="no">GU-25-000123</bdi></span>
        <span class="oa-id-card__fact"><span class="oa-id-card__label">صالحة حتى</span><bdi class="oa-id-card__number" dir="ltr">08 / 2030</bdi></span>
        <span class="oa-id-card__found">إن وُجدت هذه البطاقة، يُرجى إعادتها إلى مكتب الهوية</span>
      </div>
    </div>
  </div>
  <button class="oa-id-card__flip" type="button" aria-label="Show the Arabic side"></button>
</div>

Both faces, flat (the print page; one CR80 page per face in print):

<div class="oa-id-card oa-id-card--flat" data-person-type="student">
  <div class="oa-id-card__inner">
    <div class="oa-id-card__face" lang="en" dir="ltr">
      <div class="oa-id-card__top">
        <span class="oa-id-card__tile"><img src="../assets/logos/global-university-mark.svg" alt="" width="24" height="24"></span>
        <span class="oa-id-card__brand">
          <span class="oa-id-card__eyebrow">Global University</span>
          <span class="oa-id-card__place">Beirut · Lebanon</span>
        </span>
        <span class="oa-icon oa-id-card__contactless" aria-hidden="true" translate="no">contactless</span>
        <span class="oa-id-card__chip" aria-hidden="true"></span>
      </div>
      <div class="oa-id-card__middle">
        <span class="oa-id-card__photo" aria-hidden="true">LH</span>
        <span class="oa-id-card__identity">
          <span class="oa-id-card__name">Lina Haddad</span>
          <span class="oa-id-card__role"><span class="oa-icon oa-icon--filled" aria-hidden="true" translate="no">school</span>Student</span>
          <span class="oa-id-card__affiliation">
            <span class="oa-id-card__unit">Faculty of Engineering</span>
            <span class="oa-id-card__program">BSc Computer Science · Year 1</span>
          </span>
        </span>
      </div>
      <div class="oa-id-card__bottom">
        <span class="oa-id-card__fact"><span class="oa-id-card__label">Global ID</span><bdi class="oa-id-card__number" dir="ltr" translate="no">GU-25-000123</bdi></span>
        <span class="oa-id-card__fact"><span class="oa-id-card__label">Valid until</span><bdi class="oa-id-card__number" dir="ltr">08 / 2030</bdi></span>
        <span class="oa-id-card__seal" aria-hidden="true"><img src="../assets/logos/global-university-mark.svg" alt="" width="32" height="32"></span>
      </div>
    </div>
  </div>
</div>
<div class="oa-id-card oa-id-card--flat" data-person-type="student">
  <div class="oa-id-card__inner">
    <div class="oa-id-card__face oa-id-card__face--back" lang="ar" dir="rtl">
      <div class="oa-id-card__top">
        <span class="oa-id-card__tile"><img src="../assets/logos/global-university-mark.svg" alt="" width="24" height="24"></span>
        <span class="oa-id-card__brand">
          <span class="oa-id-card__eyebrow">الجامعة العالمية</span>
          <span class="oa-id-card__place">بيروت · لبنان</span>
        </span>
        <span class="oa-id-card__kind">بطاقة هوية جامعية</span>
      </div>
      <div class="oa-id-card__middle">
        <span class="oa-id-card__identity">
          <span class="oa-id-card__name">لينا حداد</span>
          <span class="oa-id-card__role"><span class="oa-icon oa-icon--filled" aria-hidden="true" translate="no">school</span>طالب</span>
          <span class="oa-id-card__affiliation">
            <span class="oa-id-card__unit">كلية الهندسة</span>
            <span class="oa-id-card__program">بكالوريوس علوم الحاسوب · السنة الأولى</span>
          </span>
        </span>
        <span class="oa-id-card__code"><span class="oa-icon" aria-hidden="true" translate="no">qr_code_2</span></span>
      </div>
      <div class="oa-id-card__bottom">
        <span class="oa-id-card__fact"><span class="oa-id-card__label">رقم الهوية الجامعية</span><bdi class="oa-id-card__number" dir="ltr" translate="no">GU-25-000123</bdi></span>
        <span class="oa-id-card__fact"><span class="oa-id-card__label">صالحة حتى</span><bdi class="oa-id-card__number" dir="ltr">08 / 2030</bdi></span>
        <span class="oa-id-card__found">إن وُجدت هذه البطاقة، يُرجى إعادتها إلى مكتب الهوية</span>
      </div>
    </div>
  </div>
</div>

Asset paths are relative to reference/. The University mark comes from its light master (gray and orange), which is right on the white tile in both themes.

Tailwind CSS v4

The card's interior sizes are cqw constants that no system utility expresses, and text sizes in product code are never text-[…] values (canonical §3.4). Keep the interior in the card component's own stylesheet (port it from reference/css/product.css); use utilities for the frame:

<!-- the card: a container that turns its inner box -->
<div class="@container relative isolate w-full perspective-[1600px]" data-person-type="student" data-side="en">
  <div class="relative aspect-[1.586] transform-3d transition-transform duration-extra-long-3 ease-spring">
    <!-- front: rounded-[5.5cqw] border border-transparent bg-linear-135 from-cat-orange-from via-cat-orange-mid via-58% to-cat-orange-to shadow-art text-on-card-art backface-hidden -->
    <!-- back: rotate-y-180 bg-cat-orange-container text-on-cat-orange-container backface-hidden -->
  </div>
  <button type="button" aria-label="Show the Arabic side" class="absolute inset-0 rounded-[5.5cqw] border border-transparent"></button>
</div>

Turned over, the inner box takes rotate-y-180. In print add print:rounded-none print:shadow-none to the faces.

React

Prop Type Default Description
person CardPerson — initials, nameEn, nameAr, type (one of the eight), unitEn / unitAr, programEn / programAr (Global ID's programmeEn / programmeAr), gidNumber, validUntil, photoUrl (or null: the initials show).
side "en" | "ar" "en" The side facing the person.
onFlip () => void — Called by the flip button; the page owns the side.
labels { showArabic: string; showEnglish: string } — The flip button's names, in the page language.
scanCode ReactNode — The back's slot: the rotating pass on My ID, the static code on a printed card.
flat "front" | "back" — Draws one face facing the page, with no flip button (print, side by side).
const [side, setSide] = useState<'en' | 'ar'>('en')
<IdCard
  person={person}
  side={side}
  onFlip={() => setSide((now) => (now === 'en' ? 'ar' : 'en'))}
  labels={{ showArabic: t('id.flipToArabic'), showEnglish: t('id.flipToEnglish') }}
  scanCode={<RotatingPass label={t('pass.codeLabel')} />}
/>