CheckBox

Checkbox component makes easy to turn and option on and off,which can be usefull to make ui for giving user an option to choose on something. On the lower level it uses react-native-vector-icons

checkbox
checkbox

Usage

// react base imports
import { Checkbox } from 'frontatish';
<CheckBox isDark={true} checked={true} containerStyle={{ marginRight: 20 }} />;

Props

checkColor

Color of check icon inside the checkbox,you can pass whatever color you like and control the overall checkbox style by using containerStyle

TypeDefaultRequired
string NoneNo

checked

checked will be a state variable which hold the state of the checkbox,on which checkbox will decide when to show check icon and when to not

TypeDefaultRequired
boolean false No

size

you can control the size of the checkbox and the icon inside by using this props

TypeDefaultRequired
enum('sm', 'md', 'lg') 'sm' No

disabled

disabled make sure if its true then user won't be able to click it and the onPress would not get called

TypeDefaultRequired
boolean false No

containerStyle

A react native style object which gives flexibility to alter the styles of checkbox container

TypeDefaultRequired
ViewStyle none No