Skip to content
OAIT Design System

Design system / Components

Text field

A labeled box for one value the person types, with the label above, a 56px box, and one message line under it; the family base that select, search, phone, one-time code, date, and file inputs share.

When to use

  • One value typed freely: a name, an email address, a Global ID number, a station name, a message.
  • One of the family members below, each with exactly one implementation (D-CAI-11):
Need Member
More than one line textarea
A secret password with a show and hide toggle
A phone number the phone fieldset: country code (+961 by default) and number
A code from an app or a text message one-time code: one field, never split boxes
A date the native date input
A file or a photo the file picker: a button-styled label around the native input
A choice from a list select
A query search field

When not to use

  • Two to five options a person compares: radios or choice cards; a long known list: select (D-CAI-15).
  • A setting that applies at once: a switch (D-CAI-13).
  • A long or rich list such as people or companies: a search field with radio rows in a dialog or bottom sheet. There is no custom listbox, slider, or drag-and-drop zone in 1.0 (canonical §10.4).
  • A one-time code split into one box per digit: it breaks paste, autofill, and screen readers; use one field (D-CAI-11).
  • A value the person cannot change: show it as text in a key–value row; a read-only field is only for a value that sits inside a form and comes from an official record (D-CAI-10).

Anatomy

  1. Label (<label for>): text-label-md in on-surface, 6px above the box, wraps to more lines and is never truncated.
  2. Optional marker: "(optional)" inside the label, in text-body-md on-surface-variant. Required fields carry no marker and no asterisk.
  3. Control box (.oa-field__control): holds the input and its icons; Latin-only values set dir="ltr" here.
  4. Leading icon (optional): 20px, on-surface-variant, 16px from the inline start.
  5. Input (.oa-field__input): the 56px box itself.
  6. Trailing action (optional): one 48px icon button 4px from the edges (show password, Clear search), or the select's arrow.
  7. Message row: the helper, the error, or the lock line, 4px under the box, in text-body-md.

Variants

Variant Use for Key tokens
Text (default) names, email, Global ID numbers, short answers --color-surface-container-lowest, --color-outline, --radius-field
Textarea a message of more than one line the same, at least 112px tall
Password a secret, with a toggle that shows it the same; the toggle is a standard icon button
Phone number a phone number: a fieldset with a country select and a tel input the same; both control boxes dir="ltr"
One-time code (--code) a 6-digit code from an authenticator or a text message --font-mono, --text-code-lg
Date a date of birth or an event date the native date input in the same box
File and photo a CSV import, a photo for the ID card the button recipes on a label; a 4:5 preview on --radius-card
Read-only (--readonly) a value from an official record inside a form --color-outline-variant, no fill, a lock line

Sizes

One size for every field, aligned with the 56px large button so a field and its button share a row (D-CAI-09, D-ARC-04).

Size Height Padding Type style Icon size
Field (the only size) 56px (--size-field, h-14) 16px inline (px-4); 48px at the start with a leading icon (ps-12); 56px at the end with a trailing button (pe-14) value text-body-lg; label text-label-md; messages text-body-md leading 20px (--size-icon-md); message icons 16px (--size-icon-xs); trailing icon button 24px
Textarea at least 112px (min-h-28), grows with rows="3" 12px block, 16px inline (py-3 px-4) text-body-lg —
One-time code 56px 16px inline font-mono text-code-lg (24/32 500, +0.12em) —

Spacing around a field: the label sits 6px above the box (--space-1-5, mb-1.5), the message 4px below it (--space-1, mt-1), and fields stack 20px apart (--space-fields, gap-fields) (D-LAY-11).

Tokens

Part Property Token
Label color, type --color-on-surface (text-on-surface); --text-label-md (text-label-md)
Optional marker color, type --color-on-surface-variant; --text-body-md
Box height --size-field (h-14)
Box radius --radius-field (rounded-field)
Box border 1px --color-outline (border border-outline)
Box fill --color-surface-container-lowest (bg-surface-container-lowest): white in light, a well below the page in dark
Value color, type --color-on-surface; --text-body-lg (text-body-lg)
Placeholder color --color-on-surface-variant at full strength (placeholder:text-on-surface-variant)
Focus border, ring --color-primary-ink (focus:border-primary-ink); the base ring: --size-focus-ring solid --color-focus-ring, --size-focus-offset outside
Error border, text --color-error (border-error, text-error); error text weight --font-weight-medium (font-medium)
Read-only border, fill --color-outline-variant; transparent
Disabled border, content --color-on-surface at --opacity-state-disabled-container (12%) and --opacity-state-disabled-content (38%) (disabled:border-on-surface/12 disabled:text-on-surface/38)
Icons color, size --color-on-surface-variant; --size-icon-md (leading), --size-icon-xs (messages), --size-icon-lg (select arrow)
One-time code type --font-mono, --text-code-lg (font-mono text-code-lg)
Photo preview radius, fill while loading --radius-card; --color-surface-container-high
Motion border and color change --duration-short-3 with --ease-standard (transition-colors duration-short-3 ease-standard)

States

State Border Fill Value Label Message How
Enabled 1px outline surface-container-lowest on-surface on-surface helper in on-surface-variant —
Hover no change — — — — there is no hover state (D-CAI-10)
Focus 1px primary-ink and the 3px ring, 2px outside, following the 12px radius — — unchanged — :focus; the ring is the base :focus-visible rule
Error 1px error — — unchanged (on-surface) a filled 16px error icon and words in error, font-medium, replacing the helper <input aria-invalid="true">
Error, focused 2px error with no shift (the border plus a 1px inset line) and the ring — — — — canonical §6.2
Disabled on-surface at 12% none on-surface at 38% 38% 38% the disabled attribute on the input, or on the fieldset around a group; rare, never to signal invalid input (D-CAI-06)
Read-only 1px --color-outline-variant none on-surface, selectable and focusable on-surface a 16px lock and the reason ("From the Registrar"), font-medium readonly and .oa-field--readonly

There is no pressed or dragged state on a field. Loading belongs to the button that submits the form, not to the field (button).

Behavior

  • Validation (D-CAI-10):
    1. Forms carry novalidate, so the browser's bubbles never replace the family's messages.
    2. Check on submit; after the first submit, check each field again as it changes.
    3. On a failed submit, move focus to the first invalid field.
    4. When two or more fields fail in a form of more than five fields, the form shows an error summary first: an error banner with a title, one sentence ("Check the highlighted fields."), and a link to each field; it takes focus instead of the first field (role="alert", tabindex="-1").
    5. Problems that belong to no field (the server, a rate limit) appear in an error banner above the main button (role="alert").
  • Messages are tied to the input with aria-describedby (the error or the helper first, then the lock line) and are never live regions: a submit with four errors would otherwise speak four times.
  • Password: the toggle switches the input between type="password" and type="text"; focus stays on the toggle; the value returns to hidden after the form is submitted. New-password fields state their rule in the helper (D-CAI-11).
  • Phone number: the select defaults to +961 Lebanon and lists countries by name in the page language (Intl.DisplayNames, sorted with Intl.Collator); typing a full international number that starts with "+" switches the country; a hidden input posts the canonical international value (E.164). The closed select may cut the country name at 390px; the calling code stays visible down to a 320px window, because the country column never gets narrower than 128px (two field heights and a 16px gap); at 320px the number field keeps about 148px (D-CAI-11, canonical §14.3).
  • One-time code: spaces are stripped on submit and the form never submits by itself; the "Verify" button stays the action (D-CAI-11).
  • Date: the browser's own picker and format, with min and max; the helper states the rule; no placeholder.
  • File and photo: the native file input covers its label, so the whole button is the target; the label draws the focus ring while the input has keyboard focus. The picker is an outlined 48px button, or the filled 56px button when choosing the file is the view's main action; that one, like every main button, takes the full width below 640px (.oa-actions--page around it in the reference CSS) (canonical §10.1, D-CAI-11). A file's problems are checked at once and said in words with an icon, in a message with role="alert" because they appear without a submit. After choosing, show the file name, or the photo's 4:5 preview followed by the next action ("Send for approval", the filled button, which then takes focus) and a text button "Choose another". While uploading, that button shows its loading state.
  • Layout: a field fills its column; one-step forms sit in max-w-form (460px) and stack fields 20px apart (gap-fields) (D-LAY-11). The phone grid keeps its two columns down to 320px.
  • Motion: only the border and text colors change, over duration-short-3 with ease-standard; the ring is never animated; under reduced motion every change is instant (canonical §7.7).

Accessibility

  • A visible <label for> on every field; placeholders are never labels. The phone fieldset's legend names the number input through aria-labelledby, and its select has its own name, "Country code".
  • <input aria-invalid="true"> on error, aria-describedby for the messages, and required on required fields (no visible asterisk).
  • Field values are 16px, so phones do not zoom into the field (canonical §3.8).
  • Contrast, measured for D-CAI-09 and D-CAI-10: the outline edge 4.51:1 on white and 6.08:1 in dark; values 17.12:1; helpers and placeholders 9.33:1 (11.30:1 dark); error text 5.82:1 on surface-container-low (10.08:1 dark). The disabled state is exempt (WCAG 1.4.3).
  • Targets: the field is 56px tall; a trailing icon button is 48px; the file picker is a 48px or 56px button (canonical §4.6).
  • Paste is always allowed, including in password and code fields; there are no CAPTCHA puzzles (canonical §13).
  • Every field carries the right autocomplete token and keyboard:
Value Input inputmode autocomplete Direction Other
Given or family name type="text" — given-name, family-name dir="auto" maxlength="80"
Email address type="email" — email (username on sign-in) control box dir="ltr" autocapitalize="none", spellcheck="false", maxlength="254"
Phone (the number) type="tel" tel tel-national; the select tel-country-code control boxes dir="ltr" maxlength="40"
Password type="password" — current-password, new-password control box dir="ltr" the show and hide toggle
One-time code type="text" numeric one-time-code control box dir="ltr" maxlength="7" for 6 digits and one space
Global ID number type="text" — off control box dir="ltr" autocapitalize="characters"
Message <textarea> — off dir="auto" the limit stated in words
Date of birth type="date" — bday page direction min, max

These come from the actions record's attribute table (D-CAI-09 to D-CAI-11).

RTL and languages

  • The label and the messages follow the page direction; the box keeps its geometry and only its padding and icons mirror, through logical properties (D-BCP-30).
  • Latin-only values (email, phone, password, codes, Global ID numbers) set dir="ltr" on the control box, never on the label or the messages; inside that box the select arrow and the trailing button stay on the right in Arabic (canonical §10.0, §14.2).
  • Free text without adornments (names, messages) takes dir="auto" on the input, so the text follows what is typed. A field with a leading icon or a trailing button keeps the page direction, so its icon and its padding stay on the same side.
  • Icons are not mirrored (search, lock, visibility, error, arrow_drop_down); they only move to the other side (canonical §8.3).
  • Arabic uses the same sizes with taller lines (text-body-lg 1.75); fixed 56px boxes keep their height; message icons center on the first line in either script (D-TYP-14).
  • French runs about 26% longer than English overall and up to 32% for short labels, so labels wrap; write French with a no-break space before the colon ("Par exemple :") and test every form at 360px (D-TYP-15).

Content

  • Label: a noun phrase in sentence case that names the value: "Email or Global ID number", "Date of birth", "Your message". No colon, no asterisk, no instruction (D-BCP-17, D-BCP-21).
  • Optional: add "(optional)" / "(اختياري)" / "(facultatif)" to the label of every optional field; ask only for what the task needs.
  • Helper: one or two sentences on what to enter or why we ask, under the box: "Choose a country and enter your number without its country code." / "اختر الدولة وأدخل رقمك من دون رمز الدولة." / "Choisissez un pays et saisissez votre numéro sans son indicatif."
  • Placeholder: only an example, introduced by "For example:" / "مثلًا:" (Global Jobs ships it) / "Par exemple :", at full strength: "For example: Main gate, lane 1". Never a label, an instruction, or the only hint of a format (D-CAI-10). An example email address ends with @gu.edu.lb: "For example: name@gu.edu.lb". The sign-in page alone carries two bare placeholders, "name@gu.edu.lb" and "Your password" (D-BCP-43).
  • Error: verb first, what to do, an example when a format matters, one sentence; no "please", no "invalid" (canonical §12.4). The family's model: "Enter an email address, like name@example.com." Lines that ship today in Global ID:
English Arabic French
Enter a valid email address. أدخل عنوان بريد إلكتروني صحيحًا. Saisissez une adresse e-mail valide.
That code didn’t work. Type the one showing now. لم ينجح هذا الرمز. اكتب الرمز الظاهر الآن. Ce code n’a pas fonctionné. Tapez celui qui s’affiche maintenant.
Check the selected country and phone number. تحقق من الدولة المحددة ورقم الهاتف. Vérifiez le pays sélectionné et le numéro de téléphone.
This photo is too small. Choose one at least 400 × 500 pixels. هذه الصورة صغيرة جدًا. اختر صورة لا تقل عن 400 × 500 بكسل. Cette photo est trop petite. Choisissez-en une d’au moins 400 × 500 pixels.
  • Lock line: where the value comes from, as Global ID ships it: "From the Registrar" / "من مكتب التسجيل" / "Fourni par la Scolarité", "From IT Services" / "من خدمات تقنية المعلومات" / "Fourni par les Services informatiques"; or, only for a value the ID office sets, "Set by the ID office".
  • Error summary: a factual title ("Your message was not sent"), one sentence ("Check the highlighted fields."), then each field's error as a link.
  • Example addresses are always name@example.com; an error never says whether an account exists (canonical §12.4).

Do and don't

Do Don't
Put the label above the box, in text-label-md, and let it wrap. Float the label in a notch or truncate it ("+961 Lebanc").
Mark optional fields "(optional)". Mark required fields with an asterisk.
Write "For example: Main gate, lane 1" as the placeholder and the rule in the helper. Use the placeholder as the label or as the only format hint.
Show the error under the box with a filled icon and words; keep the label on-surface. Color the label red, or show only a red edge.
Set novalidate, check on submit, and focus the first invalid field. Rely on the browser's validation bubbles or on live regions per field.
Use one field for a 6-digit code. Split the code into six boxes.
Set dir="ltr" on the control box of an email, phone, password, or code. Set dir="ltr" on the label or the message.
Show a read-only value with a lock and its reason. Disable a field to show that a value is official.

Code

HTML (reference CSS)

The field with a helper (Global ID sign-in):

<div class="oa-field">
  <label class="oa-field__label" for="tf-username">Email or Global ID number</label>
  <div class="oa-field__control" dir="ltr">
    <input class="oa-field__input" id="tf-username" name="username" type="text" autocomplete="username" autocapitalize="none" spellcheck="false" aria-describedby="tf-username-hint">
  </div>
  <p class="oa-field__message" id="tf-username-hint">Guests can also use their phone number. If it is shared, use your Global ID number.</p>
</div>

An optional field (Global Jobs contact):

<div class="oa-field">
  <label class="oa-field__label" for="tf-name">Your name <span class="oa-field__optional">(optional)</span></label>
  <div class="oa-field__control">
    <input class="oa-field__input" id="tf-name" name="name" type="text" autocomplete="name" maxlength="80" dir="auto">
  </div>
</div>

Error and read-only:

<div class="oa-field">
  <label class="oa-field__label" for="tf-email">Email</label>
  <div class="oa-field__control" dir="ltr">
    <input class="oa-field__input" id="tf-email" name="email" type="email" autocomplete="email" autocapitalize="none" spellcheck="false" value="lina.haddad@" aria-invalid="true" aria-describedby="tf-email-error">
  </div>
  <p class="oa-field__error" id="tf-email-error"><span class="oa-icon oa-icon--filled" aria-hidden="true" translate="no">error</span>Enter an email address, like name@example.com.</p>
</div>
<div class="oa-field oa-field--readonly">
  <label class="oa-field__label" for="tf-full-name">Full name</label>
  <div class="oa-field__control">
    <input class="oa-field__input" id="tf-full-name" name="full-name" type="text" value="Lina Haddad" readonly aria-describedby="tf-full-name-lock">
  </div>
  <p class="oa-field__message" id="tf-full-name-lock"><span class="oa-icon" aria-hidden="true" translate="no">lock</span>From the Registrar</p>
</div>

Disabled, as a group:

<fieldset class="oa-fieldset" disabled>
  <legend class="oa-fieldset__legend">Emergency contact</legend>
  <div class="oa-field">
    <label class="oa-field__label" for="tf-contact-name">Full name</label>
    <div class="oa-field__control">
      <input class="oa-field__input" id="tf-contact-name" name="contact-name" type="text" value="Karim Nassar" dir="auto">
    </div>
  </div>
</fieldset>

Textarea and password:

<div class="oa-field">
  <label class="oa-field__label" for="tf-message">Your message</label>
  <div class="oa-field__control">
    <textarea class="oa-field__input" id="tf-message" name="message" rows="3" maxlength="4000" dir="auto" aria-describedby="tf-message-hint"></textarea>
  </div>
  <p class="oa-field__message" id="tf-message-hint">Tell us what happened or what you need. If it is about your account, write its email address.</p>
</div>
<div class="oa-field">
  <label class="oa-field__label" for="tf-password">Password</label>
  <div class="oa-field__control" dir="ltr">
    <input class="oa-field__input" id="tf-password" name="password" type="password" autocomplete="current-password" value="cedar-lane-2026">
    <button class="oa-icon-btn oa-field__trailing" type="button" aria-label="Show password" aria-pressed="false" aria-controls="tf-password"><span class="oa-icon" aria-hidden="true" translate="no">visibility</span></button>
  </div>
</div>

Phone number, one-time code, and date:

<fieldset class="oa-fieldset oa-phone">
  <legend class="oa-fieldset__legend" id="tf-phone-legend">Phone number</legend>
  <div class="oa-phone__row">
    <div class="oa-field oa-field--select">
      <div class="oa-field__control" dir="ltr">
        <select class="oa-field__input" id="tf-phone-country" name="phone-country" autocomplete="tel-country-code" aria-label="Country code">
          <option value="FR">+33 France</option>
          <option value="LB" selected>+961 Lebanon</option>
          <option value="AE">+971 United Arab Emirates</option>
        </select>
        <span class="oa-field__trailing" aria-hidden="true"><span class="oa-icon" translate="no">arrow_drop_down</span></span>
      </div>
    </div>
    <div class="oa-field">
      <div class="oa-field__control" dir="ltr">
        <input class="oa-field__input" id="tf-phone" name="phone" type="tel" inputmode="tel" autocomplete="tel-national" maxlength="40" aria-labelledby="tf-phone-legend" aria-describedby="tf-phone-hint">
      </div>
    </div>
  </div>
  <p class="oa-fieldset__hint" id="tf-phone-hint">Choose a country and enter your number without its country code.</p>
</fieldset>
<div class="oa-field oa-field--code">
  <label class="oa-field__label" for="tf-code">6-digit code</label>
  <div class="oa-field__control" dir="ltr">
    <input class="oa-field__input" id="tf-code" name="code" type="text" inputmode="numeric" autocomplete="one-time-code" maxlength="7" value="482 913" aria-invalid="true" aria-describedby="tf-code-error">
  </div>
  <p class="oa-field__error" id="tf-code-error"><span class="oa-icon oa-icon--filled" aria-hidden="true" translate="no">error</span>That code didn’t work. Type the one showing now.</p>
</div>
<div class="oa-field">
  <label class="oa-field__label" for="tf-dob">Date of birth</label>
  <div class="oa-field__control">
    <input class="oa-field__input" id="tf-dob" name="dob" type="date" autocomplete="bday" min="1926-01-01" max="2026-11-02" aria-describedby="tf-dob-hint">
  </div>
  <p class="oa-field__message" id="tf-dob-hint">We need your date of birth because you are under 18.</p>
</div>

File, and a photo after choosing:

<div class="oa-file">
  <label class="oa-btn oa-btn--outlined oa-file__picker">
    <span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">upload_file</span>
    <span class="oa-btn__label">Choose a CSV file</span>
    <input class="oa-file__input" name="people" type="file" accept=".csv,text/csv" aria-describedby="tf-file-hint">
  </label>
  <p class="oa-file__hint" id="tf-file-hint">A CSV file saved as UTF-8, with the columns named in the first row. Up to 5,000 people.</p>
</div>
<div class="oa-file">
  <div class="oa-actions oa-actions--page">
    <label class="oa-btn oa-btn--filled oa-btn--lg oa-file__picker">
      <span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">photo_camera</span>
      <span class="oa-btn__label">Choose a photo</span>
      <input class="oa-file__input" name="photo" type="file" accept="image/jpeg,image/png,image/webp" aria-describedby="tf-photo-error">
    </label>
  </div>
  <p class="oa-file__error" id="tf-photo-error" role="alert"><span class="oa-icon oa-icon--filled" aria-hidden="true" translate="no">error</span>This photo is too small. Choose one at least 400 × 500 pixels.</p>
</div>
<div class="oa-file">
  <img class="oa-file__preview" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="The photo you chose" width="240" height="300">
  <div class="oa-actions oa-actions--page">
    <button class="oa-btn oa-btn--filled oa-btn--lg" type="button">Send for approval</button>
    <label class="oa-btn oa-btn--text oa-btn--lg oa-file__picker">
      <span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">photo_library</span>
      <span class="oa-btn__label">Choose another</span>
      <input class="oa-file__input" name="photo-again" type="file" accept="image/jpeg,image/png,image/webp">
    </label>
  </div>
</div>

The error summary (the banner's classes belong to banner):

<div class="oa-banner oa-banner--error" id="tf-summary" role="alert" tabindex="-1" aria-labelledby="tf-summary-title">
  <span class="oa-icon oa-icon--md oa-icon--filled oa-banner__icon" aria-hidden="true" translate="no">error</span>
  <div class="oa-banner__content">
    <h4 class="oa-banner__title" id="tf-summary-title">Your message was not sent</h4>
    <p class="oa-banner__message">Check the highlighted fields.</p>
    <ul class="oa-banner__list">
      <li><a class="oa-link oa-link--standalone" href="#cc-topic-legend"><span class="oa-link__label">Choose what your message is about.</span></a></li>
      <li><a class="oa-link oa-link--standalone" href="#tf-email"><span class="oa-link__label">Enter your email or phone number so we can reply.</span></a></li>
      <li><a class="oa-link oa-link--standalone" href="#tf-message"><span class="oa-link__label">Write your message (up to 4,000 characters).</span></a></li>
    </ul>
  </div>
</div>

Arabic:

<div dir="rtl" lang="ar">
  <fieldset class="oa-fieldset oa-phone">
    <legend class="oa-fieldset__legend" id="tf-ar-phone-legend">رقم الهاتف</legend>
    <div class="oa-phone__row">
      <div class="oa-field oa-field--select">
        <div class="oa-field__control" dir="ltr">
          <select class="oa-field__input" id="tf-ar-phone-country" name="phone-country-ar" autocomplete="tel-country-code" aria-label="رمز الدولة">
            <option value="AE">+971 الإمارات العربية المتحدة</option>
            <option value="FR">+33 فرنسا</option>
            <option value="LB" selected>+961 لبنان</option>
          </select>
          <span class="oa-field__trailing" aria-hidden="true"><span class="oa-icon" translate="no">arrow_drop_down</span></span>
        </div>
      </div>
      <div class="oa-field">
        <div class="oa-field__control" dir="ltr">
          <input class="oa-field__input" id="tf-ar-phone" name="phone-ar" type="tel" inputmode="tel" autocomplete="tel-national" maxlength="40" value="71 214" aria-labelledby="tf-ar-phone-legend" aria-invalid="true" aria-describedby="tf-ar-phone-error">
        </div>
      </div>
    </div>
    <p class="oa-fieldset__error" id="tf-ar-phone-error"><span class="oa-icon oa-icon--filled" aria-hidden="true" translate="no">error</span>تحقق من الدولة المحددة ورقم الهاتف.</p>
  </fieldset>
</div>

Tailwind CSS v4

The ring and the icon font come from the base CSS (canonical §6.3, §8.1); the field adds only its own classes. Write the state classes that apply, as a component does from its props.

<div class="flex flex-col">
  <label for="email" class="mb-1.5 flex flex-wrap items-baseline gap-x-2 text-label-md text-on-surface">Email address</label>
  <div class="relative" dir="ltr">
    <input id="email" name="email" type="email" autocomplete="email" aria-describedby="email-hint" class="block h-14 w-full min-w-0 rounded-field border border-outline bg-surface-container-lowest px-4 text-body-lg text-on-surface placeholder:text-on-surface-variant transition-colors duration-short-3 ease-standard focus:border-primary-ink aria-invalid:border-error aria-invalid:focus:shadow-[inset_0_0_0_1px_var(--color-error)] disabled:border-on-surface/12 disabled:bg-transparent disabled:text-on-surface/38">
  </div>
  <p id="email-hint" class="mt-1 text-body-md text-on-surface-variant">Use your account email, even if you sign in with your phone number.</p>
</div>
Part Classes
Field flex flex-col; fields in a form flex flex-col gap-fields
Label mb-1.5 flex flex-wrap items-baseline gap-x-2 text-label-md text-on-surface; the marker text-body-md text-on-surface-variant
Control box relative, plus dir="ltr" for Latin-only values
Input block h-14 w-full min-w-0 rounded-field border border-outline bg-surface-container-lowest px-4 text-body-lg text-on-surface placeholder:text-on-surface-variant transition-colors duration-short-3 ease-standard focus:border-primary-ink
Error the input adds aria-invalid:border-error aria-invalid:focus:shadow-[inset_0_0_0_1px_var(--color-error)]; the message mt-1 flex items-start gap-1.5 text-body-md font-medium text-error, its icon in flex h-[1lh] shrink-0 items-center so it centers on the first line
Disabled disabled:border-on-surface/12 disabled:bg-transparent disabled:text-on-surface/38; the label text-on-surface/38
Read-only border-outline-variant bg-transparent; the lock line mt-1 flex items-start gap-1.5 text-body-md font-medium text-on-surface-variant
Helper mt-1 text-body-md text-on-surface-variant
Leading icon the input adds ps-12; the icon pointer-events-none absolute inset-y-0 start-4 flex items-center text-on-surface-variant around a 20px icon
Trailing icon button the input adds pe-14; the button absolute end-1 top-1 with the icon button classes
Textarea block min-h-28 w-full resize-y rounded-field border border-outline bg-surface-container-lowest px-4 py-3 text-body-lg text-on-surface
One-time code the input adds font-mono text-code-lg
Phone row grid grid-cols-[minmax(calc(2*var(--size-field)+var(--space-4)),0.95fr)_minmax(0,1.35fr)] gap-x-3 inside the fieldset: the country column never narrower than 128px, so the calling code shows whole at 320px
File picker the button classes on the label, plus relative cursor-pointer has-focus-visible:outline-3 has-focus-visible:outline-offset-2 has-focus-visible:outline-focus-ring; the input absolute inset-0 size-full cursor-pointer opacity-0; the filled 56px picker of a view's main action adds w-full sm:w-auto; disabled, the label takes the button's disabled look from its input: has-disabled:cursor-default has-disabled:text-on-surface/38, plus has-disabled:bg-on-surface/12 when filled or has-disabled:border-on-surface/12 when outlined

React

<TextField
  id="email"
  label={t('signIn.email')}
  type="email"
  autoComplete="email"
  controlDir="ltr"
  hint={t('signIn.guestPhoneHint')}
  error={errors.email}
/>
<PasswordField id="password" label={t('signIn.password.label')} autoComplete="current-password" />
<PhoneField id="mobile" legend={t('registration.mobile')} countryLabel={t('registration.countryCode')} value={mobile} onValueChange={setMobile} locale={locale} />
Prop Type Default Description
id string required The input's id; the messages take {id}-hint, {id}-error, and {id}-lock.
label string required The visible label, in the page language.
optional boolean false Adds "(optional)" in the page language.
hint string — The helper line; replaced by error.
error string — The error words; sets aria-invalid and the error look.
lockLabel string — Makes the field read-only with a lock line saying where the value comes from.
leadingIcon string — A Material Symbols name for the 20px leading icon.
trailing ReactNode — One 48px icon button (password toggle, Clear search).
controlDir 'ltr' | 'auto' — 'ltr' on the control box for Latin-only values; 'auto' on free text.
multiline boolean false Renders the textarea, at least 112px tall.
...input native attributes — type, name, autoComplete, inputMode, maxLength, required, and the disabled attribute.

PasswordField adds showLabel (default "Show password", translated) and owns the toggle; PhoneField takes legend, countryLabel, value, onValueChange, locale, and defaultCountry ('LB'); CodeField takes digits (6); FilePicker takes label, accept, icon, variant ('outlined' or 'filled'), hint, error, fileName, and onFiles. Global ID's TextField calls the helper supporting; the family name is hint.