Form Inputs (Controllers)

Controller elements only: text input, select, textarea, checkbox, radio, toggle. These are pure form controls without labels or wrappers. Use with Form Field (Wrapper) and Form Layout (Collections) DS items to build complete forms.

Input Select Textarea Checkbox Radio Toggle

📐 Form Inputs Architecture

Form Inputs are controller elements only. They define visual styling for form controls but do not include labels or wrappers.

  • Provides: Input/select/textarea/checkbox/radio/toggle visual styling
  • Use with: Form Field (Wrapper) for labels + Form Layout (Collections) for multi-field arrangement
  • Does NOT: Provide label spacing, field wrappers, or multi-field layout patterns

1. Text Input

Standard text field for user input. Supports various input types (text, email, password, number). Works in both standard and glassy contexts using dedicated .input and .input--glass classes.

1.1 Standard Layout Preview

Standard Context

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

1.2 Standard Layout HTML Snippet

HTML
<input type="text" placeholder="Your name" class="input" />

<!-- Email variant -->
<input type="email" placeholder="you@example.com" class="input" />

<!-- Disabled state -->
<input type="text" placeholder="Disabled" class="input" disabled />

1.3 Glassy Layout Preview

Glassy Context

For use on dark overlays and hero sections

1.4 Glassy Layout HTML Snippet

HTML
<input type="text" placeholder="Your name" class="input input--glass" />

<!-- Email variant for glassy -->
<input type="email" placeholder="you@example.com" class="input input--glass" />

<!-- Disabled state -->
<input type="password" placeholder="Password" class="input input--glass" disabled />

2. Select (Dropdown)

Dropdown select control for choosing from predefined options. Use .select for standard contexts and .select--glass for glassy contexts.

2.1 Standard Layout Preview

Standard Context

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

2.2 Standard Layout HTML Snippet

HTML
<select class="select">
  <option>Choose an option</option>
  <option>Option 1</option>
  <option>Option 2</option>
</select>

<!-- Disabled state -->
<select class="select" disabled>
  <option>Disabled</option>
</select>

2.3 Glassy Layout Preview

Glassy Context

For use on dark overlays and hero sections

2.4 Glassy Layout HTML Snippet

HTML
<select class="select select--glass">
  <option>Select property type</option>
  <option>Cabin</option>
  <option>Villa</option>
  <option>Cottage</option>
</select>

<!-- Disabled state -->
<select class="select select--glass" disabled>
  <option>Disabled</option>
</select>

3. Textarea

Multi-line text input for larger text content like messages or descriptions. Use .textarea for standard contexts and .textarea--glass for glassy contexts.

3.1 Standard Layout Preview

Standard Context

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

3.2 Standard Layout HTML Snippet

HTML
<textarea class="textarea" placeholder="Enter your message..." rows="4"></textarea>

<!-- No-resize variant -->
<textarea class="textarea textarea--no-resize" placeholder="Fixed size" rows="5"></textarea>

<!-- Disabled state -->
<textarea class="textarea" placeholder="Disabled" disabled></textarea>

3.3 Glassy Layout Preview

Glassy Context

For use on dark overlays and hero sections

3.4 Glassy Layout HTML Snippet

HTML
<textarea class="textarea textarea--glass" placeholder="Tell us about your inquiry..." rows="5"></textarea>

<!-- No-resize variant -->
<textarea class="textarea textarea--glass textarea--no-resize" rows="4"></textarea>

<!-- Disabled state -->
<textarea class="textarea textarea--glass" disabled></textarea>

4. Checkbox

Custom-styled checkbox for binary selections. Single or multiple checkboxes can be grouped. Use .checkbox for standard contexts and .checkbox--glass for glassy contexts. Typically wrapped in Form Field with .form-field__option for label layout.

4.1 Standard Layout Preview

Standard Context

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

4.2 Standard Layout HTML Snippet

HTML
<label class="form-field__option">
  <input type="checkbox" class="checkbox" />
  <span>I agree to the terms</span>
</label>

<!-- Checked state -->
<label class="form-field__option">
  <input type="checkbox" class="checkbox" checked />
  <span>Checked checkbox</span>
</label>

<!-- Disabled state -->
<label class="form-field__option">
  <input type="checkbox" class="checkbox" disabled />
  <span>Disabled</span>
</label>

4.3 Glassy Layout Preview

Glassy Context

For use on dark overlays and hero sections

4.4 Glassy Layout HTML Snippet

HTML
<label class="form-field__option">
  <input type="checkbox" class="checkbox checkbox--glass" />
  <span>Pet-friendly property</span>
</label>

<!-- Checked state -->
<label class="form-field__option">
  <input type="checkbox" class="checkbox checkbox--glass" checked />
  <span>Amenities included</span>
</label>

<!-- Disabled state -->
<label class="form-field__option">
  <input type="checkbox" class="checkbox checkbox--glass" disabled />
  <span>Disabled</span>
</label>

5. Radio Button

Custom-styled radio button for single-selection from a group. Always use multiple radios with the same name attribute. Use .radio for standard contexts and .radio--glass for glassy contexts. Typically wrapped in Form Field with .form-field__option for label layout.

5.1 Standard Layout Preview

Standard Context

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

5.2 Standard Layout HTML Snippet

HTML
<label class="form-field__option">
  <input type="radio" name="accommodation" class="radio" checked />
  <span>Cabin</span>
</label>

<label class="form-field__option">
  <input type="radio" name="accommodation" class="radio" />
  <span>Villa</span>
</label>

<!-- Disabled state -->
<label class="form-field__option">
  <input type="radio" name="accommodation" class="radio" disabled />
  <span>Disabled</span>
</label>

5.3 Glassy Layout Preview

Glassy Context

For use on dark overlays and hero sections

5.4 Glassy Layout HTML Snippet

HTML
<label class="form-field__option">
  <input type="radio" name="stay_type" class="radio radio--glass" checked />
  <span>Weekend getaway</span>
</label>

<label class="form-field__option">
  <input type="radio" name="stay_type" class="radio radio--glass" />
  <span>Extended stay</span>
</label>

<!-- Disabled state -->
<label class="form-field__option">
  <input type="radio" name="stay_type" class="radio radio--glass" disabled />
  <span>Disabled</span>
</label>

6. Toggle Switch

Toggle switch for on/off selections. Binary choice control. Use .toggle for standard contexts and .toggle--glass for glassy contexts. Combine with .toggle__label for label text.

6.1 Standard Layout Preview

Standard Context

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

6.2 Standard Layout HTML Snippet

HTML
<!-- Checked state -->
<label class="toggle">
  <input type="checkbox" class="toggle__input" checked />
  <span class="toggle__switch"></span>
  <span class="toggle__label">Notifications enabled</span>
</label>

<!-- Unchecked state -->
<label class="toggle">
  <input type="checkbox" class="toggle__input" />
  <span class="toggle__switch"></span>
  <span class="toggle__label">Marketing emails</span>
</label>

<!-- Disabled state -->
<label class="toggle">
  <input type="checkbox" class="toggle__input" disabled />
  <span class="toggle__switch"></span>
  <span class="toggle__label">Disabled</span>
</label>

6.3 Glassy Layout Preview

Glassy Context

For use on dark overlays and hero sections

6.4 Glassy Layout HTML Snippet

HTML
<!-- Checked state -->
<label class="toggle toggle--glass">
  <input type="checkbox" class="toggle__input" checked />
  <span class="toggle__switch"></span>
  <span class="toggle__label">Pet-friendly</span>
</label>

<!-- Unchecked state -->
<label class="toggle toggle--glass">
  <input type="checkbox" class="toggle__input" />
  <span class="toggle__switch"></span>
  <span class="toggle__label">Self-catering available</span>
</label>

<!-- Disabled state -->
<label class="toggle toggle--glass">
  <input type="checkbox" class="toggle__input" disabled />
  <span class="toggle__switch"></span>
  <span class="toggle__label">Disabled</span>
</label>

Usage Guidelines

✅ Do

  • • Use controllers alone for simple forms
  • • Combine with Form Field wrapper for labels
  • • Use Form Layout for multi-field arrangement
  • • Add proper `name` and `id` attributes
  • • Always include `placeholder` for guidance
  • • Use `--glass` variants on dark overlay contexts
  • • Test both light and dark modes (toggle 🌙)

❌ Don't

  • • Don't add custom wrapper divs around controllers
  • • Don't mix standard and glassy variants in same context
  • • Don't use inline styles for borders/colors
  • • Don't remove focus rings (accessibility required)
  • • Don't forget Form Field wrapper for label layout
  • • Don't use form inputs outside proper semantic markup
  • • Don't hardcode colors or states

CSS Location

Form input controller CSS is organized into separate semantic files:

All files are imported in ui-system.css and deployed with no build step required.

Related Documentation