Checkbox

Checkbox component is used in forms when a user needs to select multiple values from several options.

    SourceTheme Source@chakra-ui/checkbox

Props#

Checkbox Props#

CheckboxGroup Props#

defaultValue

Description

The initial value of the checkbox group

Type
(string | number)[]

isDisabled

Description

If true, all wrapped checkbox inputs will be disabled

Type
boolean
Default
false

isNative

Description

If true, input elements will receive checked attribute instead of isChecked. This assumes, you're using native radio inputs

Type
boolean
Default
false

onChange

Description

The callback fired when any children Checkbox is checked or unchecked

Type
(value: (string | number)[]) => void

value

Description

The value of the checkbox group

Type
(string | number)[]

Shared Style Props#

The following style props can be set on CheckboxGroup and they will be forwarded to all children Checkbox components.

NameTypeDefaultDescription
colorSchemestringThe color of the checkbox when it is checked. This should be one of the color keys in the theme (e.g."green", "red").
childrenReact.ReactNodeThe content of the checkbox group.
sizesm, md, lgmdThe size of the checkbox.
variantstringThe variant of the checkbox.
Edit this page on GitHub

Proudly made inNigeria by Segun Adebayo

Deployed by â–² Vercel