Group
A headless component for managing multi-selection with batch operations and tri-state support.
Usage
The Group component is a specialization of Selection that enforces multi-selection behavior and supports batch operations on arrays of IDs. It always uses array-based v-model binding.
Anatomy
<script setup lang="ts">
import { Group } from '@vuetify/v0'
</script>
<template>
<Group.Root>
<Group.Item />
</Group.Root>
</template>Recipes
Batch Operations
The default slot exposes selectAll, unselectAll, and toggleAll methods for operating on all items at once:
<template>
<Group.Root v-model="selected">
<template #default="{ selectAll, unselectAll, toggleAll, isAllSelected, isMixed }">
<button @click="toggleAll">
{{ isAllSelected ? 'Deselect All' : 'Select All' }}
</button>
<Group.Item v-for="item in items" :key="item" :value="item">
{{ item }}
</Group.Item>
</template>
</Group.Root>
</template>Tri-State
The slot props isAllSelected, isNoneSelected, and isMixed reflect the aggregate selection state — useful for driving an “indeterminate” checkbox:
<template>
<Group.Root v-model="selected">
<template #default="{ isAllSelected, isMixed, toggleAll }">
<input
type="checkbox"
:checked="isAllSelected"
:indeterminate="isMixed"
@change="toggleAll"
/>
</template>
</Group.Root>
</template>Accessibility
Group is a headless state provider, not a complete interactive widget. It manages multi-selection with tri-state support and exposes that state on each slot’s attrs; it ships pointer activation (a click handler) but no keyboard navigation or focus management.
Group.Rootexposesaria-multiselectable="true".Group.Itemexposesrole="checkbox",aria-checked(true,false, or"mixed"for the indeterminate state), andaria-disabled, plusdata-selected,data-disabled, anddata-mixedfor styling.
This is checkbox-group selection state. For a fully accessible checkbox with a native hidden input, label association, and Space activation, use Checkbox, which composes the same group logic. When you bind attrs to your own element, you are responsible for supplying keyboard handlers and any roles the pattern requires beyond what Group emits.
FAQ
Group is a specialization of Selection that always binds an array and enforces multi-selection, adding batch operations (selectAll, unselectAll, toggleAll) and tri-state aggregate state. Reach for Selection when you want the general wrapper; reach for Group for a checkbox group with select-all.
Bind isAllSelected to the checkbox’s checked and isMixed to its indeterminate, then call toggleAll on change — all three are exposed on the default slot.
No — Group always uses array-based v-model. For single-choice state use Single instead.