CheckBox

Checkbox is a selection of a true or false

Usage#

Simple Usage#

checkbox truecheckbox

import { View } from 'react-native';
import { CheckBox, Text } from 'react-native-rapi-ui';
const Forms = () => {
const [checkBox, setCheckbox] = React.useState(false);
return (
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<Text style={{ marginBottom: 10 }}>TextInput</Text>
<CheckBox value={checkBox} onValueChange={(val) => setCheckbox(val)} />
<Text size="md" style={{ marginLeft: 10, color: 'gray' }}>
I agree with the Terms & Conditions
</Text>
</View>
);
};
export default Forms;

Properties#

propsrequiredvalueDefault Value
valueYesbooleanfalse
onValueChangeYes(newValue: boolean) => void
sizeNonumber24
checkedColorNostring#3366FF
unCheckedColorNostring#d8d8d8
inverseColorNostring#FFFFFF
disabledNobooleanfalse
styleNoViewStyle