Skip to main content
You are viewing Pre-Alpha documentation.
Vuetify0 Logo
Theme
Mode
Accessibility
Vuetify

Group

A headless component for managing multi-selection with batch operations and tri-state support.


RenderlessIntermediate100% coverageJan 27, 2026

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.

Selected:
<script setup lang="ts">
  import { Group } from '@vuetify/v0'
  import { shallowRef } from 'vue'

  const selected = shallowRef<string[]>([])
</script>

<template>
  <Group.Root v-model="selected">
    <div class="flex flex-col gap-2">
      <Group.Item
        v-for="item in ['apple', 'banana', 'cherry']"
        :key="item"
        v-slot="{ isSelected, toggle, attrs }"
        :value="item"
      >
        <button
          v-bind="attrs"
          class="px-3 py-1.5 border rounded text-left text-sm"
          :class="isSelected ? 'bg-surface-tint border-primary' : 'bg-surface border-divider'"
          @click="toggle"
        >
          {{ item }}
        </button>
      </Group.Item>
    </div>
  </Group.Root>

  <div class="mt-4">Selected: {{ selected.join(', ') }}</div>
</template>

Anatomy

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

<template>
  <Group.Root>
    <Group.Item />
  </Group.Root>
</template>

API Reference

The following API details are for all variations of the Group component.

Group.Root

Props

namespace

string

Namespace for dependency injection (must match GroupItem namespace)

Default: "v0:group"

disabled

boolean

Disables the entire group instance

Default: false

enroll

boolean

Auto-select non-disabled items on registration

Default: false

mandatory

boolean | "force"

Controls mandatory group behavior: - false (default): No mandatory group enforcement - true: Prevents deselecting the last selected item - `force`: Automatically selects the first non-disabled item on registration

Default: false

modelValue

T | T[]

Events

update:model-value

[value: T | T[]]

Slots

default

GroupRootSlotProps

Group.Item

Props

id

string

Unique identifier (auto-generated if not provided)

label

string

Optional display label (passed through to slot, not used in registration)

value

V

Value associated with this item

disabled

MaybeRef<boolean>

Disables this specific item

indeterminate

MaybeRef<boolean>

Sets the indeterminate state (for checkboxes)

Default: false

namespace

string

Namespace for dependency injection

Default: "v0:group"

Slots

default

GroupItemSlotProps<V>
Was this page helpful?

© 2016-1970 Vuetify, LLC
Ctrl+/