Migration Guide: v1 to v2
1. Installation
First, ensure you have the latest version of the CheckBox component installed:
npm install react-native-just-checkbox@latest
2. Updated Imports
In v2, make sure to import the CheckBox component from the updated path if it has changed:
// v1 import
import CheckBox from 'react-native-just-checkbox';
// v2 import
import { CheckBox } from 'react-native-just-checkbox';
3. Handling Animations
Version 2 introduces animations for the CheckBox component. If you want to add animations, specify the animationType
prop:
// v1 usage
<CheckBox
isChecked={true}
onToggle={handleToggle}
squareCheckBox={true}
/>
// v2 usage with animation
<CheckBox
isChecked={true}
animationType={"bouncy"} // "bouncy" or "opacity" or "none"
borderRadius={8} // instead of "squareCheckBox" props, use "borderRadius" props
onPress={handleToggle}
/>
5. Style and Design Changes
In v2, the CheckBox component supports enhanced styling options. Customize your CheckBox with our new styling props:

<CheckBox
isChecked={isChecked}
checkBoxSize={40}
checkColor="#eef3ff"
fillColor="#3d3aff"
borderWidth={3}
fillMode={true}
borderRadius={12}
animationType="bouncy"
onPress={handleToggle}
/>
Last updated