Inputs
Text field
A text field takes a short typed value, such as a description or an amount, under a label that stays visible above it; use it when the answer can't be picked from a list.
In kanso-ui as TextField
Accessibility
- Name: a
<label for>tied to the input'sid; helper and error text tied witharia-describedby, read after the name. - Errors:
aria-invalid="true"; when a save fails, focus moves to the first field in error. - Keyboard: Tab moves in and out; in a multiline field, Enter adds a line.
- Amounts:
inputmode="decimal"opens a number pad with a decimal separator. - Targets: 48px on phones; compact 40px on the web, above the 32px minimum.
- Contrast (light, dark): value
inkonsurface17.4 and 14.4:1; label and helperink-mutedonpaper6.4 and 8.9:1; placeholderink-mutedonsurface6.7 and 8.1:1; borderoutlineonsurface3.5 and 5.1:1; errorcriticalonpaper6.3 and 11.0:1; focus ring 7.3 and 9.0:1. - Motion: none.