Accessible caption for a form control.
Accessible caption for a form control. Use Label when this pattern fits the screen — variant previews are below.
Do
- Associate every control with a visible label.
- Use native
typeand validation attributes first.
Don't
- Rely on placeholder text instead of labels.
- Disable submit without explaining why.
<twig:Label for="email">Email</twig:Label>| Prop | Type | Default | Description |
|---|---|---|---|
| — | — | — | See Twig component class and package registry. |
- Errors must be programmatically associated with fields.
- Switches and checkboxes need explicit labels.