Simple React checkbox component
npm install react-simple-checkbox
npm install react-simple-checkbox
`
$3
`js
import Checkbox from 'react-simple-checkbox';
``
| name | type | default | description |
|---|---|---|---|
| id | String | checkbox's id, used for the label's 'for' attribute | |
| color | String or Object | #4A4A4A | checkbox's color. Can be a string or an object with following properties : backgroundColor, borderColor, uncheckedBorderColor and tickColor. (HEX format only) |
| size | number | 1 | possible values are 1, 2 or 3 |
| tickSize | number | 2 | possible values are 1, 2 or 3 |
| borderThickness | number | 3 | border thickness in pixels, possible values are 1, 2, 3, 4 |
| className | String | additional class name of root node | |
| delay | number | 0 | delay (in ms) before the animation |
| backAnimationDuration | number | 180 | duration (in ms) of the checkbox's background transition |
| tickAnimationDuration | number | 500 | duration (in ms) of the checkbox's tick transition |
| checked | boolean | false | |
| onChange | Function(isChecked:boolean) | called when checkbox is changed. isChecked is the new checkbox value. |