VESYL UI

ToggleGroup

A group of toggle buttons for selecting one or multiple options. Chrome matches Tabs: default is a bordered track, outline is stroke-only, ghost is bare. Use gap for space between items — layout only, never chrome.

Default

Bordered recessed track — the usual segmented control.

Multiple selection

Outline

variant="outline" keeps the outer stroke but drops the track fill.

Ghost (with gap)

variant="ghost" has no rail. Pass gap={2} (spacing scale) or a CSS string for item spacing.

Sizes

sm and md — same tokens as Tabs / Button (h-8 / h-9).

Vertical orientation

Reference

ToggleGroup

Root. Extends base-ui ToggleGroup props.

PropTypeDefaultDescription
variant"default" | "outline" | "ghost""default"Bordered track / stroke-only / bare
size"md" | "sm""md"Item height (md = h-9, sm = h-8); same tokens as Tabs / Button
gapnumber | stringFlex gap between items (number = spacing scale; string = CSS). Layout only — does not change chrome
multiplebooleanfalseWhen true, more than one item can be pressed
valuereadonly any[]Controlled pressed values (array)
defaultValuereadonly any[]Uncontrolled initial values (array; a bare string is coerced)
onValueChange(groupValue: any[], eventDetails) => voidFires when the pressed set changes
orientation"horizontal" | "vertical""horizontal"Layout direction
disabledbooleanfalseDisable the whole group
classNamestringMerged onto the root

ToggleGroupItem

One toggle in the group. Extends base-ui Toggle props. Size/chrome come from the parent group.

PropTypeDefaultDescription
valuestringValue included in the group’s pressed array when on