Change Log
v2.0.9 - 2024-07-11
What's New
Animated API Integration: We've revamped the CheckBox component to integrate with React Native's Animated API, allowing for smooth and dynamic animations.
Customizable Animations: Added support for bounce, opacity, and no animation types through the
animationTypeprop.Platform-specific Colors: If
fillModeprop is set totrue, fill color is automatically set to iOS and Android primary colors, enhancing platform-specific design consistency.Enhanced Customization: New props for
borderRadiusandborderWidthto offer finer control over the component's appearance.
Breaking Changes
Refactored Props: The structure and names of some props have changed for better clarity and usability.
checkBoxSizenow defaults to20instead of30.The
fillModeandfillColorprops have been introduced for better background customization.isCheckedandonPressare now required props for better state management.
Enhancements
Styling Overhaul: Improved styling logic to leverage React Native's StyleSheet and Animated API for dynamic style changes.
Optimized State Handling: State management for
isCheckedand component styles is now more efficient and responsive to prop changes.PropTypes for Type Safety: Continued use of PropTypes for type checking, ensuring robustness and preventing bugs.
Detailed Comparison
Animation Support
No animation support.
Animation support using React Native Animated API with bounce, opacity, and none animation type
Default Size
checkBoxSize defaults to 30.
checkBoxSize defaults to 20.
Color Customization
Only checkColor prop for checkmark color.
Added fillColor, borderColor, borderRadius, and borderWidth props for comprehensive customization.
Platform Adaptation
No platform-specific adaptations.
If fillMode is set to true, default fill colors adapt to iOS and Android primary colors for a consistent platform-specific design.
State Management
Uses internal state and props to manage isChecked.
Improved state management for isChecked and onPress with responsive prop handling.
Last updated