Checkbox API
API documentation for Checkbox component
Checkbox#
Props#
Defines valid properties in CheckboxRoot component.
State#
Defines valid state in CheckboxRoot component.
| name | type | default | description |
|---|---|---|---|
| checked | boolean | null | The checked state of the useCheckbox. |
| indeterminate | boolean | null | The indeterminate state of the useCheckbox. |
Exposes#
Defines the methods and properties exposed by CheckboxRoot component.
| name | type | default | description |
|---|---|---|---|
| state | useCheckboxState | null | The state of the useCheckbox. |
| onChange | (event: useCheckboxChangeEvent) => void | null | Callback fired when the useCheckbox's checked state changes. |
Events#
CheckboxRootChangeEvent
Event fired when the checkbox's checked state changes.
| name | type | description |
|---|---|---|
| value | unknown | Value of the checkbox. |
| originalEvent | ChangeEvent | The original event that triggered the change. |
| checked | boolean | The checked state of the checkbox. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of CheckboxRoot component.
Types#
Instance
Instance of CheckboxRoot component.
| values |
|---|
| ComponentInstance<CheckboxRootProps, CheckboxRootState, CheckboxRootExposes> |
useCheckbox#
Props#
Defines valid properties in useCheckbox.
State#
Defines valid state in useCheckbox.
| name | type | default | description |
|---|---|---|---|
| checked | boolean | null | The checked state of the useCheckbox. |
| indeterminate | boolean | null | The indeterminate state of the useCheckbox. |
Exposes#
Defines the methods and properties exposed by useCheckbox.
| name | type | default | description |
|---|---|---|---|
| state | useCheckboxState | null | The state of the useCheckbox. |
| onChange | (event: useCheckboxChangeEvent) => void | null | Callback fired when the useCheckbox's checked state changes. |
Events#
useCheckboxChangeEvent
Event fired when the checkbox's checked state changes.
| name | type | description |
|---|---|---|
| originalEvent | E | The original event that triggered the change. |
| checked | boolean | The checked state of the checkbox. |
Types#
Instance
Instance of useCheckbox headless.
| values |
|---|
| HeadlessInstance<useCheckboxProps, useCheckboxState, useCheckboxExposes> |