- Implementation
- Checkbox Props
Common Examples
Pass a visiblelabel and control selection with isSelected and onChange. Use defaultSelected instead for uncontrolled selection. The kit forbids children.isIndeterminate renders the mixed state a select-all control needs. It is presentation only — a press still resolves to the opposite of isSelected, so the caller decides what selecting “all” means.label for an indicator-only row — where a neighbouring cell is the visible name — and supply aria-label. TypeScript enforces it: a checkbox with no label and no aria-label will not compile.Accessibility
- The control uses
accessibilityRole="checkbox", witharia-checkedset totrue,false, or"mixed"whenisIndeterminateis set. It usesaria-checkedrather thanaccessibilityState.checkedbecause the two are aliases on native, but onlyaria-checkedsurvives react-native-web — without it the role ships with no checked state on web. - A visible
labelis also set asaccessibilityLabel; indicator-only rows are named by the requiredaria-label.aria-labelledbyis an Android-only addition and never the name on its own — see the warning above. - The whole row is the touch target, with a 40pt minimum — the indicator itself is 24pt, below every mobile platform’s minimum. It is a laid-out minimum rather than
hitSlop, so the accessibility frame matches the touch area.