Checkbox
Checkboxes allow the selection of multiple options from various childred.
import { Checkbox, CheckboxItem, CheckboxValue } from 'cherag-ui'
Usage
   render{
      const [checkboxes, setCheckboxes] = useState<CheckboxValue[]>([]);
      return(
        <Checkbox values={checkboxes} onChange={setCheckboxes}>
          <CheckboxItem iconSize={22} textStyle={styles.checkboxText} value="1">
            Checkbox item 1
          </CheckboxItem>
          <CheckboxItem iconSize={22} textStyle={styles.checkboxText} value="2">
            Checkbox item 2
          </CheckboxItem>
          <CheckboxItem iconSize={22} textStyle={styles.checkboxText} value="3">
            Checkbox item 3
          </CheckboxItem>
        </Checkbox>
        );
    };
󰄱
Checkbox item 1
󰄱
Checkbox item 2
󰄱
Checkbox item 3
Props
Checkbox Propertics
Name
Type
Description
values
CheckboxValues
Selected items of checkbox.
children
React.ReactNode
Child elements of checkbox.
onChange
(event: GestureResponderEvent) => void
The callback return when any children Checkbox is checked or unchecked..
CheckboxItem Propertics
Name
Type
Description
value
CheckboxValue
Selected items of checkbox.
children
React.ReactNode
Child elements of checkbox.
iconSize
number
Size of checkbox icon.
textStyle
StyleProp<ViewStyle>
style of card container.
checkedIconColor
string
Checked icon color of checkbox.
uncheckedIconColor
string
Unchecked icon color of checkbox.