Checkbox

A checkbox allows a user to select multiple items from a list of individual items, or to mark one individual item as selected.

Examples

Invalid

Left

Right

Props

className
string | ((values: CheckboxRenderProps & { defaultClassName: string; }) => string)—
isDisabled
boolean—
autoFocus
boolean—
onFocus
((e: FocusEvent<Element, Element>) => void)—
onBlur
((e: FocusEvent<Element, Element>) => void)—
onFocusChange
((isFocused: boolean) => void)—
onKeyDown
((e: KeyboardEvent) => void)—
onKeyUp
((e: KeyboardEvent) => void)—
onHoverStart
((e: HoverEvent) => void)—
onHoverEnd
((e: HoverEvent) => void)—
onHoverChange
((isHovering: boolean) => void)—
style
CSSProperties | ((values: CheckboxRenderProps & { defaultStyle: CSSProperties; }) => CSSProperties)—
slot
string | null—
id
string—
excludeFromTabOrder
boolean—
name
string—
value
string—
onChange
((isSelected: boolean) => void)—
validationBehavior
"native" | "aria"'native'
isIndeterminate
boolean—
defaultSelected
boolean—
isSelected
boolean—
isReadOnly
boolean—
isRequired
boolean—
isInvalid
boolean—
validate
((value: boolean) => true | ValidationError | null)—
inputRef
RefObject<HTMLInputElement | null>—
description
string—
label
string—
textPosition
"left" | "right"—