Skip to main content

Checkbox API

Checkbox API#

Name RequiredTypeDefault ValueDescription

useCheckboxState API#

Name RequiredTypeDefault ValueDescription

useCheckboxState Return#

NameTypeDescription
statestring | boolean | any[]The state object of the checkbox. This can be a boolean or an array of items.
setStateReact.Dispatch<React.SetStateAction<typeof state>>The React dispatch function from useState or a reference to this.setState
onChangeReact.ChangeEventHandler<HTMLInputElement>The change handler to be called by the input control when a change event fires. This calls setState for you