@rganesh24900/indeterminate-checkbox
v1.0.2
Published
[](https://www.npmjs.com/package/@rganesh24900/indeterminate-checkbox)
Readme
indeterminate-checkbox
A lightweight React component for rendering checkboxes with indeterminate state support.
Installation
npm install @rganesh24900/indeterminate-checkboxor
yarn add @rganesh24900/indeterminate-checkboxUsage
import {Checkbox} from '@rganesh24900/indeterminate-checkbox';
function App() {
return (
<Checkbox
checked={false}
indeterminate={true}
onChange={(e) => console.log(e.target.checked)}
/>
);
}Props
| Prop | Type | Description |
| -------------- | --------- | ------------------------------------------- |
| checked | boolean | Whether the checkbox is checked |
| indeterminate| boolean | Whether the checkbox is indeterminate |
| onChange | function | Callback when checkbox value changes |
| ...rest | any | Other props passed to the input element |
Example
<IndeterminateCheckbox
checked={isChecked}
indeterminate={isIndeterminate}
onChange={handleChange}
/>License
MIT
For more details, visit the npm package page.
