useCheckboxGroup

useCheckboxGroup is a custom hook that provides all the state management logic for a group of checkboxes.

Import#

import { useCheckboxGroup } from '@chakra-ui/react'

Return value#

The useCheckboxGroup hook returns following props

NameTypeDescription
valueStringOrNumber[]The value of checkbox group.
isDisabledbooleanA function to set the boolean value to false.
onChange(input: EventOrValue) => voidThe onChange handler for the checkbox group.
setValue(state: StringOrNumber[]) => voidA function to set the value of the checkbox group.
getCheckboxProps(props?: Dict) => DictA function that takes checkbox props returns them with a onChange handler for the checkbox group and the checked state.

Usage#

Parameters#

The useCheckboxGroup hook accepts an object with the following properties:

Proudly made inNigeria by Segun Adebayo

Deployed by â–² Vercel