MeldUI

Toggle Group

A set of two-state buttons that can be toggled on or off, supporting single or multiple selection.

Usage

Props

PropTypeDefaultDescription
modelValueAcceptableValue | AcceptableValue[]-The controlled value. Use with v-model.
multipleboolean-Whether multiple items can be selected at once.
variant'default' | 'outline''default'The visual style variant for all items.
size'default' | 'sm' | 'lg''default'The size of all items.
disabledbooleanfalseWhether the entire group is disabled.
orientation'horizontal' | 'vertical'-The layout direction.

Events

EventPayloadDescription
update:modelValueAcceptableValue | AcceptableValue[]Emitted when the value changes.

Sub-components

ToggleGroupItem

Individual toggle item

PropTypeDefaultDescription
value*AcceptableValue-Item value
disabledboolean-Disable this item
variant'default' | 'outline'-Visual style variant
size'default' | 'sm' | 'lg'-Item size