Click me
Homecomponentsinput
Checkbox
An input that toggles between on and off states.
Use Checkbox for selecting multiple values from several options.
Disabled
Use disabled property to disable the checkbox.
Disabled checked
Disabled unchecked
Disabled indeterminate
Indeterminate
Use checked='indeterminate' property to visualize state between not checked and checked.
Indeterminate state
Pass a boolean array as checked property. If items include both true and false values the Checkbox will have an indeterminate state. Otherwise it'll be just checked/unchecked.
Selected options
Option 1
Option 2
Option 3
Overflowing Text
The checkbox will remain aligned to the first line of text.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur.
API
name
Required
string
checked
Required
CheckboxValue
children
Required
ReactNode
id
string
value
string
required
true
false
disabled
true
false
onChange
((value: boolean | "indeterminate") => void)
onBlur
FocusEventHandler<HTMLButtonElement>
data
DataAttributeMap
ref
Ref<HTMLButtonElement>
key
Key | null