Form Inputs

Toggle Group

A set of two-state buttons that can be toggled on or off.

A set of two-state buttons that can be toggled on or off.

Multiple select#

Icons#

Variants#

Component props#

ToggleGroup#

NameTypeDescription
labelstringLabel text displayed above the group
selectionModeSelectionMode"single" | "multiple" (default: "single")
valuestring[]Controlled selected values
defaultValuestring[]Default selected values
variant'default' | 'outline' | 'primary'Item style, shared with items through context ("primary" is kept for backward compatibility)
size'sm' | 'md' | 'lg'Item size, shared with items through context
spacingnumberGap between items in spacing units. 0 (default) renders a joined group.
orientation'horizontal' | 'vertical'Layout direction (default: "horizontal")
onChange(value: string[]) => voidCalled when selection changes

ToggleGroupItem#

NameTypeDescription
idstringUnique item identifier (required unless value is set)
variant'default' | 'outline' | 'primary'Overridden by the parent group when set there
size'sm' | 'md' | 'lg'Overridden by the parent group when set there
isDisabledbooleanDisables the item