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

PropTypeDefaultRequired
defaultChecked
boolean

-

-

asChild
boolean

-

-

checked
boolean

-

-

required
boolean

-

-

onCheckedChange
(checked: CheckedState) => void

-

-

state
"error"

-

-

cssCSSProperties

-

-