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.
Single is a headless single-selection state provider. Item attrs include role="option", a tabindex, and Enter/Space. Arrow-key roving and role="radio" stay on Radio, which is built on the same 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.
Selected:
Anatomy
<script setup lang="ts">
import { Single } from '@vuetify/v0'
</script>
<template>
<Single.Root>
<Single.Item />
</Single.Root>
</template>Examples
Pro plan
$15/ month
$15 billed monthly
Accessibility
Single is a headless state provider, not a complete listbox. It manages which item is selected. Slot attrs already include role="option", a tabindex, and Enter/Space.
Single.Rootexposesaria-multiselectable="false".Single.Itemexposesaria-selectedandaria-disabled, plusdata-selectedanddata-disabledfor styling.
This is listbox-style selection state. Binding attrs already applies role="option" and Enter/Space. Add arrow-key roving yourself if the pattern needs it. For role="radiogroup", role="radio", and arrow keys, use Radio, which composes the same single-selection logic.
FAQ
Single tracks the selected item and already puts role="option", a tabindex, and Enter/Space on item attrs. Radio is a complete radio group on the same logic, adding role="radiogroup" / role="radio", arrow keys, roving tabindex, and a hidden input. Reach for Radio when you want radio buttons; reach for Single when you are building your own exclusive-choice UI and will add whatever keys option does not cover.
Single enforces exactly one selected item — selecting a new item automatically deselects the previous one — and exposes singular computed state (selectedId, selectedValue, selectedItem, selectedIndex). Selection is single-select by default. Its model is an array only when multiple is set. Use Single for exclusive choice, Selection with multiple for multi-choice.
Neither controls registration — every Single.Item registers with its Single.Root automatically on mount. Both options only affect which item starts (or stays) selected:
enrollselects each item as it registers. Despite the name it registers nothing — registration is automatic. Because Single keeps only one item selected, each registration replaces the previous, so the most recently registered non-disabled item wins (the last item in a static list). The user can still deselect it.mandatoryprevents deselecting the active item once one is selected (no auto-select on mount).mandatory="force"auto-selects the first non-disabled item on mount and prevents deselection.
To preselect a specific item, initialize the v-model with its value.