ToggleGroup
A segmented group of toggle buttons where one item (single mode) or many items (multiple mode) can be active at once.
Installation
npx dafink-ui add toggle-groupDemo
Composition
<ToggleGroup>
</ToggleGroup>
Props
| Name | Type | Default | Description |
|---|---|---|---|
| type | "single" | "multiple" | - | Controls whether one or many items can be active at once. |
| value | string | string[] | - | Controlled value. String for single mode, string[] for multiple. |
| onValueChange | (value: string | string[]) => void | - | Called with the new value when selection changes. |
| size | "sm" | "md" | "lg" | "md" | Controls height and padding of all items. |
| disabled | boolean | false | Disables all items in the group. |