Toggle Group
A grouped set of toggles for single or multiple selection.
Usage
API Reference
VoltToggleGroupItem — volt-toggle-group-item
| Input | Type | Default |
|---|---|---|
| value * | string | — |
| disabled | boolean | false |
| variant | ToggleGroupItemVariants['variant'] | 'default' |
| size | ToggleGroupItemVariants['size'] | 'md' |
VoltToggleGroup — volt-toggle-group
| Input | Type | Default |
|---|---|---|
| value | string[] | [] |
| type | 'single' | 'multiple' | 'single' |
| orientation | 'horizontal' | 'vertical' | 'horizontal' |
| disabled | boolean | false |
| allowDeselection | boolean | true |
| Output | Type |
|---|---|
| valueChange | unknown |
CVA variants
| Prop | Options | Default |
|---|---|---|
| variant | default | outline | default |
| size | sm | md | lg | md |
Component Source
Install via CLI:
npx @voltui/cli add toggle-groupTypeScript
Loading editor…
Copy this code to your project. The component uses ng-primitives/toggle-group.