AlertDialog
A control that allows the user to toggle between checked and not checked.
Name@spark-ui/checkbox
Version2.1.3
LicenseMIT
Checkbox#
A control that allows the user to toggle between checked and not checked.
Attribute | Type | Description | Default |
icon | ReactNode | The checked icon to use. | null |
indeterminateIcon | ReactNode | The indeterminate icon to use. | null |
defaultChecked | boolean | The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state. | null |
checked | CheckedStatus | The controlled checked state of the checkbox. Must be used in conjunction with onCheckedChange. | null |
disabled | boolean | When true, prevents the user from interacting with the checkbox. | null |
required | boolean | When true, indicates that the user must check the checkbox before the owning form can be submitted. | null |
name | string | The name of the checkbox. Submitted with its owning form as part of a name/value pair. | null |
value | string | The value given as data when submitted with a name. | null |
onCheckedChange | (checked: boolean) => void | Event handler called when the checked state of the checkbox changes. | null |
intent | "main" | "support" | "accent" | "basic" | "success" | "alert" | "error" | "info" | "neutral" | - | null |
CheckboxGroup#
A checkbox group allows users to select one or more items from a list of choices.
Attribute | Type | Description | Default |
defaultValue | string[] | The initial value of the checkbox group | null |
onCheckedChange | (value: string[]) => void | The callback fired when any children Checkbox is checked or unchecked | null |
orientation | "horizontal" | "vertical" | - | vertical |
intent | "main" | "support" | "accent" | "basic" | "success" | "alert" | "error" | "info" | "neutral" | - | null |
name | string | The name of the group. Submitted with its owning form as part of a name/value pair. | null |
value | string[] | The value of the checkbox group. | null |