Checkbox
Checkbox component for toggling boolean value related to some context
(code example)
info
This component extends TouchableOpacity props.
tip
This component support margin, background modifiers.
#
Usage<Checkbox value={false} onValueChange={() => console.log('value changed')}/>
#
API#
borderRadiusThe Checkbox border radius
number
#
colorThe Checkbox color
string
#
containerStyleCustom styling for the checkbox and label container
ViewStyle
#
disabledWhether the checkbox should be disabled
boolean
#
iconColorThe selected icon color
string
#
labelAdd a label to the Checkbox
string
#
labelPropsProps to pass on to the label component
TextProps
#
labelStylePass to style the label
TextStyle
#
onChangeValidityCallback for when field validity has changed
(isValid: boolean) => void
#
onValueChangeCallback function for value change event
(value) => void
#
outlineAlternative Checkbox outline style
boolean
#
requiredWhether the checkbox is required
boolean
#
selectedIconThe icon asset to use for the selected indication
ImageRequireSource
#
sizeThe Checkbox size, affect both width and height
number
#
styleCustom styling for the Checkbox
ViewStyle
#
valueThe Checkbox value. If true the switch will be turned on. Default value is false
boolean