Skip to content

shavidzet/react-smart-checkbox

Repository files navigation

react-smart-checkbox

npm version

Installation:

  • npm
npm i -P react-smart-checkbox
  • yarn
yarn add react-smart-checkbox

How 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