react-native-checkbox-svg
v2.1.1
Published
Checkbox component for React native supporting SVG graphics
Downloads
13
Maintainers
Readme
react-native-checkbox-svg
Checkbox component supporting SVG graphics for React native.
Fork of sconxu/react-native-checkbox
SVG rendering based on react-native-community/react-native-svg
Installation:
Install the component through npm using:
npm install react-native-checkbox-svg --save
Example:
import CheckBox from 'react-native-checkbox-svg';
<CheckBox
label='Label'
checked={true}
onChange={(checked) => console.log('I am checked', checked)}
/>
Props:
label
: text that will be displayed along the checkboxlabelBefore
: position the label before the checkbox (boolean). The default value is falselabelStyle
: style object that will be applied to the labelchecked
: initial checked valuecheckedImage
: checked image (e.g.: require('PATH_TO_IMAGE'))checkboxStyle
: style object that will be applied to the checkboxuncheckedImage
: unchecked image (e.g.: require('PATH_TO_IMAGE'))onChange
: callback function that will be invoked with the toggled checked property as argument.containerStyle
: style object that will be applied to the containerunderlayColor
: style the touchable component underlay coloraccessible
: indicates whether view is an accessible elementaccessibilityLabel
: maps to content description / label for Android automationtestID
: maps to id / name for iOS automation