Skip to main content
Vuetify0 is now in beta!
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

Toggle

A headless toggle button with dual-mode support: standalone boolean binding or group selection with single and multi-select.

Usage

The Toggle component supports two modes:

  • Standalone mode: Use v-model on Toggle.Root for simple boolean on/off state

  • Group mode: Wrap in Toggle.Group for single or multi-select with value-based selection

Basic Toggle

A standalone bookmark toggle with icon and label driven by v-model.

Anatomy

vue
<script setup lang="ts">
  import { Toggle } from '@vuetify/v0'
</script>

<template>
  <!-- Standalone -->
  <Toggle.Root>
    <Toggle.Indicator />
  </Toggle.Root>

  <!-- Group (single select) -->
  <Toggle.Group>
    <Toggle.Root>
      <Toggle.Indicator />
    </Toggle.Root>

    <Toggle.Root>
      <Toggle.Indicator />
    </Toggle.Root>

    <Toggle.Root>
      <Toggle.Indicator />
    </Toggle.Root>
  </Toggle.Group>

  <!-- Group (multi select) -->
  <Toggle.Group multiple>
    <Toggle.Root>
      <Toggle.Indicator />
    </Toggle.Root>

    <Toggle.Root>
      <Toggle.Indicator />
    </Toggle.Root>

    <Toggle.Root>
      <Toggle.Indicator />
    </Toggle.Root>
  </Toggle.Group>
</template>

Examples

Toolbar

Use Toggle.Group with multiple to build a formatting toolbar. Each toggle operates independently — any combination can be active.

Formatting Toolbar

Multi-select bold, italic, underline, and strikethrough toggles that apply text formatting.

The quick brown fox jumps over the lazy dog. This sentence demonstrates how your formatting selections apply in real time.

View Switcher

Use Toggle.Group with mandatory for mutually exclusive options like layout switchers. The mandatory prop prevents deselecting all items.

View Switcher

Mandatory single-select toggle between grid and list views controlling layout display.

6 folders
Photos
248 items
Documents
53 items
Music
112 items
Videos
37 items
Archives
19 items
Downloads
84 items

Accessibility

Toggle renders as a native <button> element with proper ARIA attributes:

AttributeValueDescription
aria-pressedtrue / falseReflects the pressed state
aria-disabledtrue / absentPresent when disabled

Group ARIA

AttributeValueDescription
rolegroupIdentifies the toggle group
aria-orientationhorizontal / verticalLayout direction
aria-disabledtrue / absentPresent when group is disabled

Keyboard

KeyAction
SpaceToggle pressed state
EnterToggle pressed state (native button behavior)

Data Attributes

AttributeValuesDescription
data-stateon / offCSS styling hook for pressed state
data-disabledpresent / absentCSS styling hook for disabled state
data-orientationhorizontal / verticalGroup orientation (on group element)

API Reference

The following API details are for all variations of the Toggle component.
Was this page helpful?

Ctrl+/