Form Field (Wrapper)

Label and control wrapper for all form controllers. It handles label spacing, required indicator, hint text, and error message patterns. Pair with Form Inputs (Controllers) such as .input, .select, .textarea, .checkbox, .radio, and .toggle.

Text Input Select Textarea Option Helper Validation

1. Text Input Field

Standard text input field with required indicator, hint text, and error state shown together for quick reference.

1.1 Standard Layout Preview

Standard Context

For use on normal page surfaces (content areas, cards, dialogs)

Use your legal name for the reservation

Please enter a valid email address

1.2 Standard Layout HTML Snippet

HTML
<div class="field">
  <label class="field__label">Email Address</label>
  <div class="field__control">
    <input type="email" class="input" placeholder="you@example.com">
  </div>
</div>

<div class="field">
  <label class="field__label field__label--required">Full Name</label>
  <div class="field__control">
    <input type="text" class="input" placeholder="Jane Doe" required>
  </div>
  <p class="field__hint">Use your legal name for the reservation</p>
</div>

<div class="field">
  <label class="field__label field__label--required">Email Address</label>
  <div class="field__control">
    <input type="email" class="input is-error" value="invalid-email">
  </div>
  <p class="field__error">Please enter a valid email address</p>
</div>

1.3 Glassy Layout Preview

Glassy Context

For use on dark overlays and hero sections

Use your legal name for the reservation

Please enter a valid email address

1.4 Glassy Layout HTML Snippet

HTML
<div class="field field--glass">
  <label class="field__label">Email Address</label>
  <div class="field__control">
    <input type="email" class="input input--glass" placeholder="you@example.com">
  </div>
</div>

<div class="field field--glass">
  <label class="field__label field__label--required">Full Name</label>
  <div class="field__control">
    <input type="text" class="input input--glass" placeholder="Jane Doe" required>
  </div>
  <p class="field__hint">Use your legal name for the reservation</p>
</div>

<div class="field field--glass">
  <label class="field__label field__label--required">Email Address</label>
  <div class="field__control">
    <input type="email" class="input input--glass is-error" value="invalid-email">
  </div>
  <p class="field__error">Please enter a valid email address</p>
</div>

2. Select Field

Form Field wrapper paired with the select controller. Use for guest count, options, and enumerated choices.

2.1 Standard Layout Preview

Standard Context

For use on normal page surfaces (content areas, cards, dialogs)

2.2 Standard Layout HTML Snippet

HTML
<div class="field">
  <label class="field__label field__label--required">Number of Guests</label>
  <div class="field__control">
    <select class="select" required>
      <option value="">Select guests</option>
      <option value="1">1 Guest</option>
      <option value="2">2 Guests</option>
      <option value="4">4 Guests</option>
      <option value="6">6 Guests</option>
    </select>
  </div>
</div>

2.3 Glassy Layout Preview

Glassy Context

For use on dark overlays and hero sections

2.4 Glassy Layout HTML Snippet

HTML
<div class="field field--glass">
  <label class="field__label field__label--required">Number of Guests</label>
  <div class="field__control">
    <select class="select select--glass" required>
      <option value="">Select guests</option>
      <option value="1">1 Guest</option>
      <option value="2">2 Guests</option>
      <option value="4">4 Guests</option>
      <option value="6">6 Guests</option>
    </select>
  </div>
</div>

3. Textarea Field

Multi-line input field for longer notes. Combine with hint text for guidance.

3.1 Standard Layout Preview

Standard Context

For use on normal page surfaces (content areas, cards, dialogs)

Maximum 500 characters

3.2 Standard Layout HTML Snippet

HTML
<div class="field">
  <label class="field__label">Message</label>
  <div class="field__control">
    <textarea class="textarea" rows="4" placeholder="Enter your message..."></textarea>
  </div>
  <p class="field__hint">Maximum 500 characters</p>
</div>

3.3 Glassy Layout Preview

Glassy Context

For use on dark overlays and hero sections

Maximum 500 characters

3.4 Glassy Layout HTML Snippet

HTML
<div class="field field--glass">
  <label class="field__label">Message</label>
  <div class="field__control">
    <textarea class="textarea textarea--glass" rows="4" placeholder="Enter your message..."></textarea>
  </div>
  <p class="field__hint">Maximum 500 characters</p>
</div>

4. Option Helper (Checkbox/Radio)

Use .form-field__option to align checkbox or radio controls with text labels. Pair the text with DS typography classes.

4.1 Standard Layout Preview

Standard Context

For use on normal page surfaces (content areas, cards, dialogs)

Select all that apply

4.2 Standard Layout HTML Snippet

HTML
<div class="field">
  <label class="field__label">Select Options</label>
  <div class="field__control">
    <label class="form-field__option">
      <input type="checkbox" class="checkbox">
      <span class="t-body">Option 1 - Regular size</span>
    </label>
    <label class="form-field__option">
      <input type="radio" name="option" class="radio">
      <span class="t-body">Option 2 - Radio choice</span>
    </label>
  </div>
  <p class="field__hint">Select all that apply</p>
</div>

4.3 Glassy Layout Preview

Glassy Context

For use on dark overlays and hero sections

Select all that apply

4.4 Glassy Layout HTML Snippet

HTML
<div class="field field--glass">
  <label class="field__label">Select Options</label>
  <div class="field__control">
    <label class="form-field__option">
      <input type="checkbox" class="checkbox">
      <span class="t-body">Option 1 - Regular size</span>
    </label>
    <label class="form-field__option">
      <input type="radio" name="option-glass" class="radio">
      <span class="t-body">Option 2 - Radio choice</span>
    </label>
  </div>
  <p class="field__hint">Select all that apply</p>
</div>

Usage Guidelines

Do

  • Use .field for all form controls
  • Use .field__label--required for required fields
  • Use .field__hint for helper text
  • Use .field__error with controller .is-error
  • Use .field--glass and glass controllers in overlays
  • Use .form-field__option for checkbox/radio labels

Don't

  • Don't style controller borders or padding inside field CSS
  • Don't add required asterisk in markup
  • Don't use Tailwind text utilities on labels or hints
  • Don't mix standard controllers inside glassy fields
  • Don't use inline background colors in preview blocks
  • Don't omit the .field__control wrapper

CSS Location

Form Field wrapper styles are defined in:

/assets/css/form-field.css

Includes: label spacing, required indicator, hint text, error message styling, glass variants, and checkbox/radio option alignment.

Related Documentation