Checkbox
Accessible checkbox input with custom visuals.
Usage
import {Checkbox} from 'kinu';
<Checkbox checked aria-label="Accept" />
Exports
| Name | Description | Rendered HTML |
|---|---|---|
| Checkbox | Selection control | <input k="checkbox"> |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| checked | boolean |
— | Controls the checked state. |
| data-state | "indeterminate" |
— | Marks the checkbox as indeterminate for styling. |
| onChange | (event: Event) => void |
— | Change handler for the checkbox. |
| disabled | boolean |
— | Disable the checkbox. |
| name | string |
— | Input name used for form submissions. |
| value | `string | number | readonly string[] |
Notes
- Wraps
<input type="checkbox">so forms just work. - Supports data-state="indeterminate" styling for tri-state usage.
_Source: src/components/checkbox/index.tsx