CheckGroup

CheckGroups are used to group and manage checkbox controls.

Example

API

Learn more about the properties and the customization points.

Usage

import CheckGroup from "@sonnat/ui/CheckGroup";
//or
import { CheckGroup } from "@sonnat/ui";

Properties

Note that the documentation avoids mentioning all the native props (there are a lot) in this section of the components.

CheckGroup Properties
NameTypeDefaultDescription
childrennode-The content of the group.
classNamestring-Append to the class names applied to the component so you can override or extend the styles.
valuestring[]-The values of the selected checkboxes.
defaultValuestring[]-The default value. Use when the component is not controlled.
layoutDirection"row" | "column""column"The layout direction of the group.
onChangefunction-The callback fires when a checkbox has selected.
Signature: function(selectedValues: string[]) => void
  • The ref is forwarded to the root element.
  • Any other properties supplied will be provided to the root element.