1010[ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge )] ( https://opensource.org/licenses/MIT )
1111[ ![ styled with prettier] ( https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=for-the-badge )] ( https://github.com/prettier/prettier )
1212
13- <p align =" center " >
14- <img alt="React Native Bouncy Checkbox"
15- src="assets/Screenshots/example.gif" width="49%" height="715"/>
16- <img alt="React Native Bouncy Checkbox"
17- src="assets/Screenshots/example.png" width="49%" />
18- </p >
13+ <table >
14+ <tr >
15+ <td align="center">
16+ <img alt="React Native Bouncy Checkbox"
17+ src="assets/Screenshots/react-native-bouncy-checkbox.gif" />
18+ </td>
19+ <td align="center">
20+ <img alt="React Native Bouncy Checkbox"
21+ src="assets/Screenshots/react-native-bouncy-checkbox.png" />
22+ </td>
23+ </tr >
24+ </table >
1925
2026## Installation
2127
@@ -27,7 +33,7 @@ Add the dependency:
2733npm i react- native- bouncy- checkbox
2834```
2935
30- ## Version 1 .0.0 is Here 🥳
36+ ## Version 2 .0.0 is Here 🥳
3137
3238- Typescript
3339- ** Zero Dependency**
@@ -44,70 +50,49 @@ import BouncyCheckbox from "react-native-bouncy-checkbox";
4450## Basic Usage
4551
4652``` js
47- < BouncyCheckbox / >
48- ```
49-
50- ## Basic Usage
51-
52- ``` jsx
53- < BouncyCheckbox
54- isChecked
55- textColor= " #000"
56- fillColor= " red"
57- text= " Buy tickets for concert 🎉 🎊"
58- onPress= {(checked ) => console .log (" Checked: " , checked)}
59- / >
53+ < BouncyCheckbox onPress= {(isChecked : boolean ) => {}} / >
6054```
6155
6256## Advanced Custom Usage
6357
6458``` jsx
6559< BouncyCheckbox
66- isChecked= {false }
67- textColor= " #000"
68- unfillColor= " white"
69- text= " Custom Icon Example"
70- fontFamily= " JosefinSans-Regular"
71- onPress= {(checked ) => console .log (" Checked: " , checked)}
72- iconComponent= {
73- < FastImage
74- style= {{ height: 10 , width: 10 }}
75- source= {require (" ./assets/checkmark.png" )}
76- / >
77- }
60+ size= {25 }
61+ fillColor= " red"
62+ unfillColor= " #FFFFFF"
63+ text= " Custom Checkbox"
64+ iconStyle= {{ borderColor: " red" }}
65+ textStyle= {{ fontFamily: " JosefinSans-Regular" }}
66+ onPress= {(isChecked : boolean ) => {}}
7867/ >
7968```
8069
8170### Configuration - Props
8271
8372| Property | Type | Default | Description |
8473| -------------------- | :-------: | :------------: | ----------------------------------------------------------- |
85- | borderWidth | number | 1 | border width of the checkbox |
86- | borderRadius | number | 20 | border radius of the checkbox |
87- | borderColor | string | #ffc484 | border color of the checkbox |
74+ | text | string | Call my mom 😇 | set the checkbox's text |
75+ | onPress | function | null | set your own onPress functionality after the bounce effect |
76+ | disableText | boolean | false | if you want to use checkbox without text, you can enable it |
8877| size | number | 25 | size of ` width ` and ` height ` of the checkbox |
78+ | style | style | default | set/override the container style |
79+ | textStyle | style | default | set/override the text style |
80+ | iconStyle | style | default | set/override the icon style |
8981| isChecked | boolean | false | set the default checkbox value |
82+ | fillColor | color | #f09f48 | change the checkbox's filled color |
9083| unfillColor | color | transparent | change the checkbox's un-filled color when it's not checked |
9184| useNativeDriver | boolean | true | enable/disable the useNativeDriver for animation |
92- | text | string | Call my mom 😇 | set the checkbox's text |
93- | textColor | color | #757575 | change the text's color |
94- | fontSize | number | 16 | change the text's font size |
95- | fillColor | color | #f09f48 | change the checkbox's filled color |
96- | textStyle | object | default | set your own text style |
97- | textDecoration | boolean | false | enable/disable text decoration for Text |
98- | onPress | function | null | set your own onPress functionality after the bounce effect |
9985| iconComponent | component | Icon | set your own icon component |
100- | iconStyle | object | default | set your own icon style |
10186| checkIconImageSource | image | default | set your own check icon image |
102- | checkImageWidth | number | 10 | change the check icon's width |
103- | checkImageHeight | number | 10 | change the check icon's height |
10487| ImageComponent | component | Image | set your own Image component instead of RN's default Image |
105- | disableText | boolean | false | if you want to use checkbox without text, you can enable it |
88+ | bounceEffect | number | 1 | change the bounce effect |
89+ | bounceFriction | number | 3 | change the bounce friction |
10690
10791### Future Plans
10892
10993- [x] ~~ LICENSE~~
11094- [x] ~~ Typescript Challange!~~
95+ - [x] ~~ Version 2.0.0 is alive 🥳~~
11196- [ ] Write an article about the lib on Medium
11297
11398## Author
0 commit comments