Foundation UI
Input
Single-line text fields: names, emails, search, prices and file uploads. 44 px tall by default, with 36 and 52 px sizes.
Examples
Text input
We only use this to reply to your enquiry.
Sizes
With icon
Input group
$ to
sq ft
Validation
Enter a valid phone number.
Looks good.
File upload
JPG or PNG, up to 5 MB each.
Classes
| Class | Purpose |
|---|---|
.form-control | Text input. Sizes .form-control-sm (36) and .form-control-lg (52), default 44 px. |
.input-icon | Wrapper that puts an icon inside an input. Add .icon-end to the icon to place it on the right. |
.input-group + .input-group-text | Prefix or suffix text such as a currency or unit. |
.is-invalid / .is-valid | Validation states. Pair with .invalid-feedback or .valid-feedback. |
.form-label / .form-text | Label above the field and help text below it. |
Always connect a <label> to its field with for and id, and link help or error text with aria-describedby. Without a visible label, use aria-label.