ComponentForm Inputs

Form Inputs

Forms allow users to input and submit information.

Input Types

  • Text Input
  • Password Input
  • Dropdowns
  • Radio Buttons
  • Checkboxes

Code Example

<label for="name">Name</label>
<input id="name" type="text" class="input-field" placeholder="Enter your name" />
 
<label for="terms">
  <input id="terms" type="checkbox" /> Agree to terms
</label>

Accessibility

  • Use <label> elements with for attributes.
  • Use aria-describedby for validation messages.