Selection
A headless component for managing selection state in collections with support for single and multi-selection patterns.
Usage
The Selection component provides a wrapper and item pattern for managing selection state in collections. It supports both single and multi-selection with full v-model support and automatic state synchronization.
Selected:
Anatomy
<script setup lang="ts">
import { Selection } from '@vuetify/v0'
</script>
<template>
<Selection.Root>
<Selection.Item />
</Selection.Root>
</template>Accessibility
Selection is a headless state provider, not a complete interactive widget. It tracks which items are selected and exposes that state on each slot’s attrs; it ships pointer activation (a click handler) but no role, keyboard navigation, or focus management.
Selection.Rootexposesaria-multiselectable, reflecting themultipleprop —truein multi-select mode,falseotherwise.Selection.Itemexposesaria-selectedandaria-disabled, plusdata-selectedanddata-disabledfor styling.
For fully accessible widgets built on this selection state, reach for the specialized providers and form components that compose it — Single and Group, or Radio and Checkbox, which add native inputs, label association, and keyboard handling. 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
The component wraps createSelection internally, exposing the same logic through a compound Selection.Root / Selection.Item template API. Reach for the composable directly when you need state without the component surface.
Bind v-model on Selection.Root — it provides full v-model support with automatic synchronization between the model and the selected items.