Related components

Checkbox field


Checkbox provides a styled checkbox without a label.

Checkboxes should be accompanied by labels, so rather than using Checkbox directly in a UI, it’s normally best to the CheckboxField component, which combines a Checkbox with a Label and displays validation errors. Alternatively, use this Checkbox component to compose other field components with more specific requirements.

<Checkbox />
<Checkbox checked="indeterminate"/>

API Reference

Checkbox
PropTypeDefaultRequired
asJSX.IntrinsicElements--
asChild
boolean
--
checked
boolean
--
defaultChecked
boolean
--
onCheckedChange
(checked: CheckedState) => void
--
required
boolean
--
size
"md" | "lg"
md-
state
"error"
--