React Native MantineInputs

Checkbox

Checkbox with indeterminate state

Import: import { Checkbox } from 'react-native-mantine';

Usage

import { Checkbox } from 'react-native-mantine';

// Basic checkbox
<Checkbox
  label="Accept terms and conditions"
  checked={accepted}
  onChange={setAccepted}
/>

// Indeterminate state
<Checkbox
  label="Select all"
  checked={allSelected}
  indeterminate={someSelected}
  onChange={toggleAll}
/>

// Disabled checkbox
<Checkbox
  label="Cannot change this"
  checked={true}
  disabled
/>

Props

PropTypeDefaultDescription
labelReact.ReactNodeCheckbox label displayed next to the checkbox
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Checkbox size that controls the dimensions of the checkbox box
colorMantineColor'blue'Checkbox color from theme (e.g., "blue", "red", "green", "orange", "grape")
checkedbooleanfalseControlled checked state of the checkbox
onChange(checked: boolean) => voidCallback fired when checkbox state changes, receives new checked state
indeterminatebooleanfalseIf true, checkbox displays in indeterminate state (dash instead of checkmark)
disabledbooleanfalseDisabled state - prevents interaction and reduces opacity
styleViewStyleAdditional styles applied to the checkbox box itself
wrapperStyleViewStyleAdditional styles applied to the wrapper container (checkbox + label)

Source on GitHub · npm