Skip to content

Multi-Select

Enable selecting multiple values with the multiple prop. The v-model becomes an array, the dropdown stays open between selections, and users can toggle options on and off.

Basic Multi-Select

Add multiple to SelectRoot and bind v-model to an array.

API Setup (Multi-Select)

vue
<script setup>
import { ref } from 'vue'
import {
  SelectRoot,
  SelectControl,
  SelectInput,
  SelectContent,
  SelectOption,
} from 'vue-superselect'

const selected = ref([])
const skills = ['Vue', 'React', 'Svelte', 'Solid', 'Angular']
</script>
Basic Multi-Select

Key Differences from Single Select

BehaviorSingleMulti
v-model typeT | nullT[]
After selectionDropdown closesDropdown stays open
Clicking selected optionNo effectDeselects (toggle)
QueryPreservedClears after each selection
template
<SelectRoot v-model="selected" multiple>
  <!-- same template structure as single select -->
</SelectRoot>

The only state-level difference is selected must be an array (ref([]) / selected: []).

Tags with Remove Buttons

Use SelectTag inside SelectControl's scoped slot to render removable tags for each selection.

Multi-Select with Tags

How Tags Work

SelectControl exposes a scoped slot with selectedItems and removeItem:

template
<SelectControl v-slot="{ selectedItems, removeItem }">
  <SelectTag
    v-for="item in selectedItems"
    :key="String(item.value)"
    :value="item.value"
    :label="item.label"
    @remove="removeItem"
  />
  <SelectInput placeholder="Add members..." />
</SelectControl>
Slot DataTypeDescription
selectedItems{ value: unknown; label: string }[]Currently selected items with resolved labels
removeItem(value: unknown) => voidRemoves an item from the selection
multiplebooleanWhether multi-select mode is active

SelectTag renders a tag with a remove button by default. You can customize it with a scoped slot:

template
<SelectTag :value="item.value" :label="item.label" v-slot="{ label, remove }">
  <span>{{ label }}</span>
  <button @click="remove">Remove</button>
</SelectTag>

Backspace removal: When the input is empty and the user presses Backspace, the last selected tag is automatically removed.

Max Selections with Hide Selected

Limit the number of selections with max and hide already-selected options from the dropdown with hide-selected (always enabled in this example).

Multi-Select with Max Limit and Hide Selected

Props for Multi-Select Control

PropTypeDefaultDescription
multiplebooleanfalseEnable multi-select mode
maxnumberundefinedMaximum number of selections allowed
hide-selectedbooleanfalseRemove selected options from the visible dropdown

When the max limit is reached:

  • Unselected options become disabled (grayed out, not clickable)
  • The disabled scoped slot prop on SelectOption becomes true for unselected items
  • Already-selected options can still be toggled off

Combine max with hide-selected for a cleaner experience. As users select options, those options disappear from the list, and the limit prevents selecting too many.

template
<SelectRoot v-model="selected" multiple :max="3" hide-selected>
  <!-- ... -->
</SelectRoot>

Next Steps