In this tutorials we will use a package named @react-native-community/checkbox to add checkboxes in react native. So follow the below setups:-
1) Install the @react-native-community/checkbox package like below in your application
yarn add @react-native-community/checkbox or npm install @react-native-community/checkbox --save On iOS, install cocoapods: npx pod-install
2) Link the module in your application
react-native link @react-native-community/checkbox
3) Import the package
import CheckBox from '@react-native-community/checkbox';
4) Example
follow below example to use checkbox
import React , {useState } from 'react'; import CheckBox from '@react-native-community/checkbox'; const [toggleCheckBox, setToggleCheckBox] = useState(false) function AddContactScreen ({navigation}){ return ( ); } export default AddContactScreen;