Field
Associate a control with its label, instructions, and error message.
alpina-ui/ui/fieldUsage notes
Put the label, help and correction next to their control. The accessible description reads the error first and includes each referenced hint only once.
When to use
Keep the label, format hint and error for one editor together across validation states.
When to avoid
Several radios or checkboxes sharing a question need a fieldset and legend.
Accessibility
Pass the supplied control attributes to the real input so its label, description and validation message are linked.
| Key | Action |
|---|---|
| Tab / Shift+Tab | Move through any links or controls supplied inside the component, in document order. |
Content
Name one value, give one concrete format example and use a corrective sentence for an error. Keep the hint separate from the label.
- Use
- Reference / Enter the reference shown on your letter.
- Avoid
- Invalid input!
Copy in four languages
- German
- Referenznummer14 characters
- French
- Numéro de référence19 characters
- Italian
- Numero di riferimento21 characters
- Romansh
- Numer da referenza18 characters
npx --no-install alpina add field