Checkbox
Interactive
See Checkbox in Storybook for every variant, with live controls.
A binary choice within a form. For a setting that applies immediately, use Switch instead.
import { Checkbox } from "@kairosis/eidos";
<Checkbox label="Retry failed runs" checked={retry} onChange={setRetry} />;
Props
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | — | Required. Controlled |
onChange | (checked: boolean) => void | — | Receives the next value, not the event |
label | ReactNode | — | |
disabled | boolean | false | |
name / value | string | — | For grouped form submission |
Forwards a ref to the underlying <input type="checkbox">.
Guidelines
- The native input is visually hidden but still present, so it keeps focus, keyboard toggling and the accessibility tree. The visible box is styled from
:checkedand:focus-visible. - Clicking the label toggles the box.
onChangehands you the boolean directly — noe.target.checkedneeded.