Displays a boolean value.
Change state with checked props.
Checkbox of different sizes.
Differentiate states by color.
Unusable and un-clickable Checkbox.
Manage a set of Checkbox.
| Attribute | Description | Type | Accepted values | Default |
|---|---|---|---|---|
| checked | checked or not | boolean | - | - |
| initialChecked | checked or not on initial | boolean | - | false |
| onChange | change event handler | CheckboxEvent | - | - |
| value | unique identification value (only in group) | string | - | - |
| disabled | disable checkbox | boolean | - | false |
| type | current type | CheckboxTypes | CheckboxTypes | default |
| ref | forwardRef | Ref<HTMLInputElement | null> | - | - |
| ... | native props | LabelHTMLAttributes | 'form' ... | - |
| Attribute | Description | Type | Accepted values | Default |
|---|---|---|---|---|
| value | checked children | Array<string> | - | [] |
| disabled | disable checkbox group | boolean | - | false |
| onChange | change event handler | (values: string[]) => void | - | - |
| ... | native props | HTMLAttributes | 'id', ... | - |
type CheckboxTypes =
| 'default'
| 'primary'
| 'secondary'
| 'success'
| 'warning'
| 'error'
| 'info'
interface CheckboxEventTarget {
checked: boolean
}
export interface CheckboxEvent {
target: CheckboxEventTarget
stopPropagation: () => void
preventDefault: () => void
nativeEvent: React.ChangeEvent
}
Previous
Card
Next
Code

