Elements

Components

Toggle Group

ToggleGroup, dressed in the paper-and-ink system: a hairline tray of quiet seals where the pressed item takes the flat ink fill. The parts — Root, Item.

#Basic usage

toggle-group/basic Vue React

#Props

#Item

PropTypeDefaultDescription
disabledboolean | undefined—
valuestring—

#Root

PropTypeDefaultDescription
sizeString as PropType<"sm" | "md" | "lg">"md"One rung of the control-height ladder for the items.
defaultValuestring[]The initial selected value of the toggle group when rendered. Use when you don't need to control the selected value of the toggle group.
deselectablebooleantrueWhether the toggle group allows empty selection. Note: This is ignored if multiple is true.
disabledbooleanWhether the toggle is disabled.
idstringThe unique identifier of the machine.
idsPartial<{ root: string; item(value: string): string; }>The ids of the elements in the toggle. Useful for composition.
loopFocusbooleantrueWhether to loop focus inside the toggle group.
modelValuestring[]The v-model value of the toggle group
multiplebooleanWhether to allow multiple toggles to be selected.
orientationtoggleGroup.Orientation"horizontal"The orientation of the toggle group.
rovingFocusbooleantrueWhether to use roving tab index to manage focus.