Skip to content
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.

Which shifts can you cover?Mornings06:00 – 14:00Nights22:00 – 06:00

API Reference

PropTypeDefaultDescription
checkedbooleanfalseThe controlled checked state of the checkbox.
onCheckedChange(checked: boolean) => void—Callback fired when the checked state changes.
disabledbooleanfalseWhen true, prevents interaction with the checkbox.
idstring—The id attribute, useful for associating with a label.