Components
Checkbox
A tri-state control on Radix Checkbox — checked, unchecked, or indeterminate.
A thin styling wrapper over
Radix Checkbox: checked accepts
true, false, or "indeterminate" — the third state SelectableDataTable's select-all header uses
when only some rows are checked.
Accessibility
- Pair with a real, associated label — either
<Label htmlFor>(as in the example) or anaria-labelfor a standalone checkbox with no adjacent visible text (e.g. a row-selection checkbox — seeSelectableDataTable'sgetRowLabel).
Do / Don't
- Do use the
"indeterminate"state for a genuine partial-selection summary (a select-all header over a partially-selected set) — not as a stand-in for "disabled" or "unknown". - Don't reach for a bare
Checkboxto build a custom multi-select dropdown from scratch —MultiSelectalready composesCheckboxcorrectly (real checkboxes in a labelled group, not a listbox) for exactly that case.