toggle-group

Toggle Group

Toggles the shopper presses one or several of, such as jacket features to filter by; joined into one control, or spaced apart.

Parts

PartFileDoes
ToggleGroupToggleGroup.vueGroups toggles so the user can choose one or several options.
ToggleGroupItemToggleGroupItem.vueLets the user switch one option of its group on or off.

Anatomy

<ToggleGroup>
  <ToggleGroupItem />
</ToggleGroup>

Styling

All of Toggle Group’s styles live in toggle-group.json. New to styling in Frontic UI? How styling works →

Install

Installs with it
toggle
use-field-control
npm packages
@vueuse/core
class-variance-authority
reka-ui

Built from

API reference

ToggleGroup.vue

Groups toggles so the user can choose one or several options.

Props 16

PropTypeDefault
rovingFocusbooleantrue
disabledbooleanfalse
orientationDataOrientation—
dirDirection—
loopbooleantrue
asChildbooleanfalse
asAsTag | Component—
namestring—
requiredbooleanfalse
typeSingleOrMultipleType—
modelValueAcceptableValue | AcceptableValue[]—
defaultValueAcceptableValue | AcceptableValue[]—
classClassValue—
variantToggleVariant—
sizeToggleSize—
spacingToggleGroupSpacing0

Events 1

EventPayload
update:modelValuepayload: AcceptableValue | AcceptableValue[]

Slots 1

SlotSlot props
default{ modelValue: AcceptableValue | AcceptableValue[] | undefined; }

Data attributes 6

Data attributeValues
data-join-x—
data-join-y—
data-size'md' | 'sm' | 'lg' | 'icon-sm' | 'icon-md' | 'icon-lg'
data-spacing—
data-variant'default' | 'outline'
data-vertical—

Recipe toggle-group 6 groups

ToggleGroupItem.vue
Toggle Group
State