Checkbox
Single checkbox. onChange reports (checked, event). indeterminate renders the partial
state (visual only — it is not a value).
import { Checkbox } from '@gg-software/ui';
<Checkbox label="Send me updates" defaultChecked />
<Checkbox label="Select all" indeterminate />
<Checkbox checked={agreed} onChange={(checked) => setAgreed(checked)} label="I agree" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | — | |
defaultChecked | boolean | — | |
indeterminate | boolean | false | render the partial/indeterminate state (visual only; not a checked value) |
disabled | boolean | false | |
label | ReactNode | — | |
children | ReactNode | — | content rendered inside the component |
value | string | — | |
name | string | — | |
id | string | — | |
className | string | — | |
onChange | ((checked: boolean, event: ChangeEvent<HTMLInputElement, Element>) => void) | — |
* required · generated from packages/ui/src/input/Checkbox/Checkbox.tsx