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)
<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>Key Differences from Single Select
| Behavior | Single | Multi |
|---|---|---|
| v-model type | T | null | T[] |
| After selection | Dropdown closes | Dropdown stays open |
| Clicking selected option | No effect | Deselects (toggle) |
| Query | Preserved | Clears after each selection |
<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.
How Tags Work
SelectControl exposes a scoped slot with selectedItems and removeItem:
<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 Data | Type | Description |
|---|---|---|
selectedItems | { value: unknown; label: string }[] | Currently selected items with resolved labels |
removeItem | (value: unknown) => void | Removes an item from the selection |
multiple | boolean | Whether multi-select mode is active |
SelectTag renders a tag with a remove button by default. You can customize it with a scoped slot:
<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).
Props for Multi-Select Control
| Prop | Type | Default | Description |
|---|---|---|---|
multiple | boolean | false | Enable multi-select mode |
max | number | undefined | Maximum number of selections allowed |
hide-selected | boolean | false | Remove selected options from the visible dropdown |
When the max limit is reached:
- Unselected options become disabled (grayed out, not clickable)
- The
disabledscoped slot prop onSelectOptionbecomestruefor 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.
<SelectRoot v-model="selected" multiple :max="3" hide-selected>
<!-- ... -->
</SelectRoot>