Skip to main content

Checkbox Group

Group checkboxes, with an optional parent that checks them all.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
childrenReactNode-The checkboxes.
The checkboxes.
labelReactNode-Names the group for screen readers and is shown above it.
Names the group for screen readers and is shown above it.
parentLabelReactNode-
allValuesstring[]-
valuestring[]-
defaultValuestring[]-The checked values on first render, uncontrolled.
The checked values on first render, uncontrolled.
onValueChange(value: string[]) => void-Called with the checked values whenever they change.
Called with the checked values whenever they change.
namestring-Form field name for the parent checkbox.
Form field name for the parent checkbox.
countLabelstring-
shapenone | roundedrounded
disabledbooleanfalseIgnores interaction on every checkbox in the group.
Ignores interaction on every checkbox in the group.
classNamestring-Merged with the group's own classes, so a utility you pass wins.
Merged with the group's own classes, so a utility you pass wins.