react-indeterminate-checkbox

1.0.5 • Public • Published

🌕 🌗 🌑 React Indeterminable Checkbox 🌑 🌗 🌕

License JavaScript Style Guide Dependencies Maintainability

Simple checkbox component with "indeterminate" status support.

Live Demo

Live demo here!

Installation

You can install this package with npm or yarn

npm install react-indeterminate-checkbox
yarn add react-indeterminate-checkbox

Usage

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.

Package Sidebar

Install

npm i react-indeterminate-checkbox

Weekly Downloads

5

Version

1.0.5

License

MIT

Last publish

Collaborators

  • micheleriva