Forms
Checkbox
A toggle control for boolean values. Built on Base UI primitives with accessible keyboard support and animated check indicator.
Import
import {
Checkbox,
CheckboxCard,
} from "@mikenotthepope/substrateui"With Label
As cards
Checkbox is the 18px box, and the target is the box. CheckboxCard is the same control grown into the whole row — 56px tall, a label and a muted description — and a tap anywhere in it toggles. It also renders a submitted answer read-only, and a staff preview with no control in it at all, neither of them dimmed. See Choice Card.
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | false | The controlled checked state of the checkbox. |
onCheckedChange | (checked: boolean) => void | — | Callback fired when the checked state changes. |
disabled | boolean | false | When true, prevents interaction with the checkbox. |
id | string | — | The id attribute, useful for associating with a label. |