Checkbox
Turn an independent option on or off.
alpina-ui/ui/checkboxSample shipment
Package contents
Usage notes
Set indeterminate for a partially selected set. Clear that prop when the user chooses a definite checked or unchecked value.
When to use
Let someone choose any number of independent options before submitting a form.
When to avoid
Use RadioGroup when exactly one answer is permitted. Use Switch for a setting that applies immediately.
Accessibility
Make the text part of the label and expose a mixed state when a parent represents partially selected children.
| Key | Action |
|---|---|
| Space | Toggle the focused control. |
| Tab / Shift+Tab | Continue to the next or previous control. |
Content
Phrase each label as an affirmative choice. Keep the key noun near the beginning and move qualifications into a hint.
- Use
- Send a copy by email
- Avoid
- Do not disable email copies
Copy in four languages
- German
- Kopie per E-Mail senden23 characters
- French
- Envoyer une copie par courriel30 characters
- Italian
- Invia una copia per e-mail26 characters
- Romansh
- Trametter ina copia per e-mail30 characters
npx --no-install alpina add checkbox