Checkbox

A checkbox is an input control that allows a user to select one or more options from a number of choices.

Use Field to compose a label, helper text, and validation message around this control.

Usage

Size

With label

Disabled

Props

PropTypeDefaultDescription
size'sm' | 'md' | 'lg''md'Size of the checkbox
checkedbooleanfalseWhether the checkbox is checked
defaultCheckedboolean-The default checked state for uncontrolled usage
onCheckedChange(checked: boolean) => void-Callback when the checked state changes
disabledbooleanfalseWhether the checkbox is disabled
idstring-HTML id attribute for label association