react-smart-checkbox
v1.1.0
Published
[](https://badge.fury.io/js/react-smart-checkbox)
Downloads
9
Readme
react-smart-checkbox
Installation:
- npm
npm i -P react-smart-checkbox- yarn
yarn add react-smart-checkboxHow to use:
- import component
import ReactSmartCheckbox from 'react-smart-checkbox'- use component
<ReactSmartCheckbox
name='fruits'
options={['orange', 'apple', 'banana']}
/>Read more below about component's additional attributes ↓
| attribute | type | required | |-------------------|--------|----------| | name | string | true | | options | array | true | | initialValues | array | false | | onChange | func | false |
- initialValues should pass array to check any child(s) on componentWillMount hook triggers
- onChange is callback function and returns checked childrens array
