formscheckbox-group
CheckboxGroup
Multi-select checkbox group with card, list, and table layout variants.
Import#
Slot Structure#
Fieldset with an optional legend grouping multiple Checkbox items.
Examples#
Variants#
List, card, and table variants with shared items data.
Sizes#
Size scale from xs to xl in card variant.
Orientation#
Vertical and horizontal layouts with the same item set.
Indicator#
Start/end/hidden indicator positions in list layout.
Controlled + Disabled Items#
Controlled selected values with per-item disabled state.
API Reference#
Attributes#
Slot
root0 attributesGroup container that owns checkbox collection state and layout.
No attribute metadata for this slot.
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
| checkedIcon | IconT.Name | — | Default checked icon for all items. |
| class | ClassValue | — | Class applied to the component root or trigger element. |
| classes | CheckboxGroupT.Classes | undefined | — | — |
| defaultValue | string[] | undefined | — | The default value of the input (uncontrolled). |
| disabled | boolean | undefined | false | Whether the input is disabled. |
| id | string | undefined | — | The ID of the input element. |
| indeterminateIcon | IconT.Name | — | Default indeterminate icon for all items. |
| indicator | "hidden" | "end" | "start" | undefined | — | Default indicator position for all items. |
| items | (string | CheckboxGroupT.Item<TTrue, TFalse>)[] | undefined | — | Array of items to render in the group. |
| legend | JSX.Element | — | Legend for the checkbox group. |
| name | string | undefined | — | The name of the input element, used for form submission. |
| onChange | ((value: string[]) => void) | undefined | — | Callback when the selected values change. |
| orientation | "horizontal" | "vertical" | undefined | — | — |
| readOnly | boolean | undefined | false | Whether the input is read-only. |
| ref | JSX.HTMLElementTags["div"] extends { ref?: infer Ref; } ? Ref : never | undefined | — | — |
| required | boolean | undefined | false | Whether the input is required. |
| size | "xs" | "sm" | "md" | "lg" | "xl" | undefined | — | — |
| style | JSX.CSSProperties | undefined | — | — |
| styles | CheckboxGroupT.Styles | undefined | — | — |
| value | string[] | undefined | — | The current value of the input (controlled). |
| variant | "list" | "table" | "card" | undefined | — | — |
Items#
| Prop | Type | Default | Description |
|---|---|---|---|
| checkedIcon | IconT.Name | — | Custom checked icon for this item. |
| description | JSX.Element | — | Description for the group item. |
| disabled | boolean | undefined | — | Whether the item is disabled. |
| indeterminate | boolean | undefined | — | Whether the item is indeterminate. |
| indeterminateIcon | IconT.Name | — | Custom indeterminate icon for this item. |
| label | JSX.Element | — | Label for the group item. |
| value | string | undefined | — | Value of the group item. |