react-native-just-checkbox
  • Introduction
  • Getting Started
  • Examples
  • Change Log
  • Migration Guide: v1 to v2
Powered by GitBook
On this page

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 animationType prop.

  • Platform-specific Colors: If fillMode prop is set to true , fill color is automatically set to iOS and Android primary colors, enhancing platform-specific design consistency.

  • Enhanced Customization: New props for borderRadius and borderWidth to 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.

    • checkBoxSize now defaults to 20 instead of 30.

    • The fillMode and fillColor props have been introduced for better background customization.

    • isChecked and onPress are 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 isChecked and 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

Feature
v1.0.0
v2.0.0

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.


PreviousExamplesNextMigration Guide: v1 to v2

Last updated 11 months ago