Text Input
A labeled field. Text is one line. Message is a taller note. States are default, hover, focus, read-only, disabled, and error.
This is some helper text...
This is some error message text...
Playground
This is some helper text...
Variants and states
| Property | Options | Notes |
|---|---|---|
| type | text, message | Text is 36px tall. Message is the taller note field. |
| state | default, hover, focus, read-only, disabled, error | Hover uses the highlight fill. Focus uses the tertiary border. Read only uses the border fill. Disabled is 30% opacity. Error uses the red fade, a red border, an alert icon, and a text explanation. |
| motion | standard timing | Default, hover, focus, read-only, disabled, and error use the standard timing and easing. |
Accessibility
- Always set a label and id.
- Set aria-invalid and point aria-describedby at the error.