Labels and instructions
Write a concise noun phrase for the label. Put formatting rules and consequences in help text before the user starts.
Design · Forms
Forms use native controls, visible labels, and direct language. The shared control surface keeps text entry, selection, validation, and actions consistent without replacing browser semantics.
Fields
Keep labels visible above their controls. Use the matching native input type so browsers can provide the right keyboard, validation, and autofill behavior.
Choices
Use checkboxes for independent choices, radios for one choice from a set, and a switch only for an immediate on-or-off setting. The entire label remains clickable.
States
State must remain available to assistive technology and cannot rely on color alone. Put help before entry, and place a specific correction beside an invalid control.
Anatomy
.form-demo / .form-grid.field.field-labelhtmlFor and a unique id..field-hint / .field-erroraria-describedby; add aria-invalid when validation fails..control.choice-group / .choice.field-actionsUsage
Write a concise noun phrase for the label. Put formatting rules and consequences in help text before the user starts.
Validate at a useful moment, preserve entered values, and identify both the problem and the correction. Move focus only after submission when necessary.
Prefer read-only when people may need to inspect or copy a value. Disable a control only when it is truly unavailable, and explain why nearby.