Skip to content

CheckboxInput

A checkbox input with label, description, and validation support.

<CheckboxInput label="Accept terms" value={false} />
<CheckboxInput label="Accept terms" value />
<CheckboxInput label="Accept terms" value="indeterminate" />
Receive weekly product updates and announcements.
<CheckboxInput
label="Subscribe to newsletter"
value={false}
description="Receive weekly product updates and announcements."
/>
<CheckboxInput label="Accept terms" value={false} size="sm" />
<CheckboxInput label="Accept terms" value={false} size="lg" />
<CheckboxInput label="Accept terms" value isDisabled />
<CheckboxInput label="Accept terms" value isReadOnly />
<CheckboxInput label="Accept terms" value isLoading />
<CheckboxInput label="Accept terms" value={false} isRequired />
<CheckboxInput
label="Accept terms"
value={false}
status={{message: 'You must accept the terms to continue.', type: 'error'}}
/>
This setting may affect performance.
<CheckboxInput
label="Accept terms"
value
status={{message: 'This setting may affect performance.', type: 'warning'}}
/>
Preference saved.
<CheckboxInput
label="Accept terms"
value
status={{message: 'Preference saved.', type: 'success'}}
/>
<CheckboxInput
label="Enable notifications"
value={false}
startContent={<Icon color="secondary" icon={Bell} size="sm" />}
/>
New
<CheckboxInput
label="Beta features"
value={false}
endContent={<Badge color="blue" label="New" />}
endContentPosition="inline"
/>
New
<CheckboxInput
label="Beta features"
value={false}
endContent={<Badge color="blue" label="New" />}
endContentPosition="end"
/>

A checkbox input with label, description, and validation support.

When isOptional: false, isRequired: false

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the root element.
data-testidstringTest ID applied to the input element.
descriptionReactNodeSupporting text rendered below the label.
endContentReactNodeContent rendered after the label.
endContentPosition'end' | 'inline''inline'Where to place endContent within the item. 'end' pushes it to the trailing edge; 'inline' keeps it next to the label.
htmlNamestringHTML name attribute for native form submission.
htmlValuestringHTML value attribute for native form submission.
isDisabledbooleanfalseWhether the checkbox is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the checkbox is in a loading state.
isReadOnlybooleanfalseWhether the checkbox is read-only.
label*stringField label text.
labelIconIconComponentOptional content shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
onBlur(event: FocusEvent<HTMLInputElement>) => voidCalled when the input loses focus.
onChange*(checked: boolean, event: ChangeEvent<HTMLInputElement>) => voidCalled when the checked state changes.
onFocus(event: FocusEvent<HTMLInputElement>) => voidCalled when the input receives focus.
refRef<HTMLInputElement>Ref forwarded to the input element.
size"sm" | "md" | "lg"'md'Visual size of the checkbox.
startContentReactNodeContent rendered after the checkbox control and before the label.
statusInputStatusValidation status displayed below the checkbox.
styleCSSPropertiesInline styles applied to the root element.
value*boolean | "indeterminate"Current checked state: true, false, or 'indeterminate'.
width'auto' | 'full''full'Width of the checkbox item.
isOptionalfalse
isRequiredfalse

When isOptional: true, isRequired: false

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the root element.
data-testidstringTest ID applied to the input element.
descriptionReactNodeSupporting text rendered below the label.
endContentReactNodeContent rendered after the label.
endContentPosition'end' | 'inline''inline'Where to place endContent within the item. 'end' pushes it to the trailing edge; 'inline' keeps it next to the label.
htmlNamestringHTML name attribute for native form submission.
htmlValuestringHTML value attribute for native form submission.
isDisabledbooleanfalseWhether the checkbox is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the checkbox is in a loading state.
isReadOnlybooleanfalseWhether the checkbox is read-only.
label*stringField label text.
labelIconIconComponentOptional content shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
onBlur(event: FocusEvent<HTMLInputElement>) => voidCalled when the input loses focus.
onChange*(checked: boolean, event: ChangeEvent<HTMLInputElement>) => voidCalled when the checked state changes.
onFocus(event: FocusEvent<HTMLInputElement>) => voidCalled when the input receives focus.
refRef<HTMLInputElement>Ref forwarded to the input element.
size"sm" | "md" | "lg"'md'Visual size of the checkbox.
startContentReactNodeContent rendered after the checkbox control and before the label.
statusInputStatusValidation status displayed below the checkbox.
styleCSSPropertiesInline styles applied to the root element.
value*boolean | "indeterminate"Current checked state: true, false, or 'indeterminate'.
width'auto' | 'full''full'Width of the checkbox item.
isOptional*true
isRequiredfalse

When isOptional: false, isRequired: true

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the root element.
data-testidstringTest ID applied to the input element.
descriptionReactNodeSupporting text rendered below the label.
endContentReactNodeContent rendered after the label.
endContentPosition'end' | 'inline''inline'Where to place endContent within the item. 'end' pushes it to the trailing edge; 'inline' keeps it next to the label.
htmlNamestringHTML name attribute for native form submission.
htmlValuestringHTML value attribute for native form submission.
isDisabledbooleanfalseWhether the checkbox is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label.
isLoadingbooleanfalseWhether the checkbox is in a loading state.
isReadOnlybooleanfalseWhether the checkbox is read-only.
label*stringField label text.
labelIconIconComponentOptional content shown before the label.
labelTooltipReactNodeTooltip content shown next to the label.
onBlur(event: FocusEvent<HTMLInputElement>) => voidCalled when the input loses focus.
onChange*(checked: boolean, event: ChangeEvent<HTMLInputElement>) => voidCalled when the checked state changes.
onFocus(event: FocusEvent<HTMLInputElement>) => voidCalled when the input receives focus.
refRef<HTMLInputElement>Ref forwarded to the input element.
size"sm" | "md" | "lg"'md'Visual size of the checkbox.
startContentReactNodeContent rendered after the checkbox control and before the label.
statusInputStatusValidation status displayed below the checkbox.
styleCSSPropertiesInline styles applied to the root element.
value*boolean | "indeterminate"Current checked state: true, false, or 'indeterminate'.
width'auto' | 'full''full'Width of the checkbox item.
isOptionalfalse
isRequired*true