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

Single

A headless provider for exclusive single-selection — selecting an item automatically deselects the previously selected one. Drives tabs, segmented controls, theme pickers, and other exclusive-choice UIs.

Note

Single is a headless single-selection state provider — it tracks the selected item but ships no role, keyboard navigation, or focus management. For an accessible radio group with role="radio" and arrow-key navigation, use Radio, which is built on the same single-selection logic.

Usage

The Single component is a specialization of Selection that enforces single-selection behavior. When an item is selected, any previously selected item is automatically deselected.

Single-Select Group

Three size options that behave as an exclusive choice — selecting one deselects the rest. Each item binds its slot attrs, so selection state drives styling through the data-selected attribute.

Selected:

Anatomy

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

<template>
  <Single.Root>
    <Single.Item value="option-1" v-slot="{ attrs }">
      <button v-bind="attrs">Option 1</button>
    </Single.Item>

    <Single.Item value="option-2" v-slot="{ attrs }">
      <button v-bind="attrs">Option 2</button>
    </Single.Item>
  </Single.Root>
</template>

Examples

Mandatory Selection

Use mandatory to prevent deselecting the active item — once something is selected, clicking it again is a no-op, so at least one item always stays selected. mandatory="force" goes further: it auto-selects the first non-disabled item on mount and enforces the no-deselect rule.

In this example the first option is disabled, so mandatory="force" skips it and selects the second item on mount.

Selected:

Accessibility

Single is a headless state provider, not a complete interactive widget. It manages which item is selected and exposes that state on each item’s slot attrs; it does not ship a role, keyboard navigation, or focus management.

  • Single.Root exposes aria-multiselectable="false".

  • Single.Item exposes aria-selected and aria-disabled, plus data-selected and data-disabled for styling.

This is listbox/tab-style selection state. For an accessible radio group — role="radiogroup", role="radio", arrow-key navigation, and roving tabindex — use Radio, which composes the same single-selection logic. When you bind attrs to your own element, you are responsible for supplying the appropriate role and keyboard handlers for the pattern you are building.

FAQ

API Reference

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

Ctrl+/