Component docs
Loading
"use client";
import { CheckboxGroup } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
options (required) | readonly ChoiceOption[] | — | Options to choose from. |
defaultValue | readonly string[] | — | Initial value when uncontrolled. |
disabled | boolean | — | Disables interaction. |
name | string | — | — |
onValueChange | (value: string[]) => void | — | Called with the new value (only when it changes). |
orientation | "horizontal" | "vertical" | — | Layout and arrow-key axis. |
value | readonly string[] | — | Current value (controlled); null where it means "nothing selected". |
optionsrequiredreadonly ChoiceOption[]
Options to choose from.
defaultValuereadonly string[]
Initial value when uncontrolled.
disabledboolean
Disables interaction.
namestring
onValueChange(value: string[]) => void
Called with the new value (only when it changes).
orientation"horizontal" | "vertical"
Layout and arrow-key axis.
valuereadonly string[]
Current value (controlled); null where it means "nothing selected".
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
const options = [
{ label: "candraw", value: "candraw" },
{ label: "cantext", value: "cantext" },
];
<CheckboxGroup options={options} />