forms · primitive
Choice
Checkbox groups + radio groups. Built on Nuxt UI's
UCheckbox + URadioGroup. The two patterns answer different questions: checkbox = "any number of these"; radio = "exactly one of these". checkbox group
With select-all + indeterminate
radio group
Single choice from a bounded set
notes
When to reach for which
- Checkbox group when "any subset, possibly none" — pipeline stages, optional features, multiple categories.
- Radio group when "exactly one, never zero" — document type, classification tier, single status.
- Switch (
USwitch) when the choice is binary and the action takes effect immediately — privacy toggle, dark mode. - If choices exceed ~6 items, switch to a select dropdown.