CheckboxMultiselect
A checkbox group: several checkbox items in one group, multiple selections allowed.
Basic usage
The selected value is an array, driven by the value / defaultValue / onChange channels; onChange carries the full value array. With name, every option's checkbox shares it and the checked ones submit as multiple same-name fields.
Shift+click range selection
Click one item, then click another with Shift held: the range between the two clicks (both ends included) is set to the state the second item just flipped to; disabled items in the range keep their state. This mirrors bulk-checking in list tables.
Using it with FieldLayout
To give the whole group a field label, wrap it with FieldLayout. Clicking the field label moves focus to the first enabled option's checkbox (it does not toggle anything — a group has no "one value for the whole group" semantics like a single checkbox does).
Disabled
- An option's own
disabledskips that item (not checkable). - Component-level
disableddisables every option in the group, and the group state wins. See Selection and options · Disabled.
Keyboard and focus
- Every option's native
<input type="checkbox">is in the Tab order; ↑↓←→ are an in-group shortcut — they move focus cyclically between non-disabled items (unlikeRadioSelect, they only move focus and do not select directly), and Space toggles the current item. - A Shift+click range starts from the item last clicked (or last toggled with Space).
onChange's second argument is the nativechangeevent that triggered this change.- Option roots carry
role='checkbox'andaria-checked(the original's option roots have no role and express selection only via a class), so screen readers can read each option's state directly.
API
See also
- Option data and the keyboard focus model: Selection and options
- A single checkbox: CheckboxInput
- The checkbox group field that submits with a form:
CheckboxMultiselectInput