Checkbox

Checkbox is one of the selection controls that lets users select multiple items from a list.

Group Label
Helper text
State
Orientation
Source code

Component props

NameDefault valueTypeIs required?Description
isChecked
falsebooleanNoIs the checkbox checked?
isIndeterminate
falsebooleanNoIs the checkbox in a "mixed" state? Renders as a "minus" icon; useful for "select all"-type checkboxes.
onChange
ToggleEventHandler<HTMLInputElement>NoChange handler
label
stringYesHuman-readable label
hideLabel
falsebooleanNoIs the label hidden? (Usually false)
subtext
stringNoSubtext rendered below the checkbox
isDisabled
falsebooleanNoIs the checkbox disabled?
hasError
booleanNoDoes the checkbox have an error?
name
stringNoInput name for the checkbox
size
"medium" | "large"NoSize variant
testId
stringNoID for automated testing
className
stringNoCSS class names
tabIndex
0numberNotab-index to apply
backgroundStyle
transparent"transparent" | "filled"NoSet the background style for a checkbox