@billogram/use-checkbox

A React hook for checkbox components

Usage no npm install needed!

<script type="module">
  import billogramUseCheckbox from 'https://cdn.skypack.dev/@billogram/use-checkbox';
</script>

README

@billogram/use-checkbox

A React hook for checkbox components

Install

yarn add @billogram/use-checkbox

Usage

import useCheckbox from '@billogram/use-checkbox';

See types for exported types.

useCheckbox

const {
    handleClick,
    handleKeyDown,
} = useCheckbox({
    disabled: false,
    onChange: noop,
    value,
});

Note

This library is being published with our use cases in mind and is not necessarily meant to be consumed by the broader public. We probably won't take your feature requests unless they align with our own needs.

License

MIT