CheckBox

The Checkbox component in React Native allows users to select or deselect options with a customizable interface. It supports properties like checked for state management, onChange for handling state changes, and styling options for visual customization.


Props

checked
Type: boolean
Description: Indicates whether the checkbox is checked or not.
       <Checkbox checked={isChecked} ... /> 
    
onChange
Type: (isChecked: boolean) => void
Description: Callback function invoked when the checkbox state changes.
       <Checkbox onChange={handleCheckboxChange} ... /> 
    
style
Type: Style Object
Description: Description: Custom styles to apply to the checkbox container.
       <Checkbox style={{ color: 'red' }} ... /> 
    
prefix
Type: React Node
Description: Content displayed before the checkbox input.
       <Checkbox prefix={<Text>Select: </Text>} ... /> 
    
suffix
Type: React Node
Description: Content displayed after the checkbox input.
       <Checkbox suffix={<Text>{isChecked ? 'Checked' : 'Unchecked'}</Text>} ... /> 
    
color
Type: string
Description: Specifies the color of the checkbox or its associated elements.
       <Checkbox color="blue" ... />