Skip to Content
Puzzle

Checkbox

Select independent options with native checkbox semantics.

Import

import { Checkbox } from "@puzzle-ui/ui";

Labels and states

Use a visible label (or children). description is associated with the input. indeterminate displays a mixed state without changing the checked value.

390 × 400

Sizes

390 × 300

API

PropTypeDefaultDescription
label, childrenReactNode-Visible label; label takes precedence.
descriptionReactNode-Supporting description.
size"sm" | "md" | "lg""md"Visual size.
indeterminatebooleanfalseNative mixed state.
checkedboolean-Controlled selection.
defaultCheckedboolean-Initial uncontrolled selection.
onChangeChangeEventHandler<HTMLInputElement>-Read selection from event.target.checked.
disabled, requiredbooleanfalseNative disabled and required behavior.

Other native input props and ref target the input; className and style target its wrapping label. Space toggles a focused checkbox. Provide aria-label if no visible label exists.

;