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-group

Demo

Composition

<ToggleGroup>
<ToggleGroupItem />
</ToggleGroup>

Props

NameTypeDefaultDescription
type"single" | "multiple"-Controls whether one or many items can be active at once.
valuestring | 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.
disabledbooleanfalseDisables all items in the group.