1.0.5 • Published 8 years ago
react-indeterminate-checkbox v1.0.5
🌕 🌗 🌑 React Indeterminable Checkbox 🌑 🌗 🌕
Simple checkbox component with "indeterminate" status support.
Live Demo
Installation
You can install this package with npm or yarn
npm install react-indeterminate-checkboxyarn add react-indeterminate-checkboxUsage
import IndeterminableCheckbox from 'react-indeterminate-checkbox'
const checkBox = () => {
<IndeterminableCheckbox
change={val => console.log(val)}
name="mycheckbox-name"
indeterminate={true}
/>
}Props
| Name | Value |
|---|---|
change | Returns 0, 1 or 2. 0: indeterminable 1: checked 2: unchecked |
name | the checkbox input name |
indeterminate | Boolean value, set true if you want to start with an indeterminable status. Set to false if you want it to start with the checked value. |