Vuetify V-Select multiple example
Vuetify is a popular Material Design component library for Vue.js, and one of its useful components is v-select, which allows users to make selections from a list of items. In this post, we will explore how to use the v-select component with the "multiple" feature to enable multiple selections. We'll create a simple example that demonstrates this functionality.




Thanks for your feedback!
Your contributions will help us to improve service.
The HTML Structure
Let's start with the HTML structure that includes a Vuetify v-container
for our content. Inside the container, we have a heading and a v-select
element. Here's what the HTML code looks like:
<v-container>
<h3>Vuetify V-Select multiple Select example</h3>
<v-select clearable v-model="selectedSchools" :items="schoolNames" label="Select St. Louis schools" multiple
chips></v-select>
<div>
Selected St. Louis Schools: {{ selectedSchools }}
</div>
</v-container>
JavaScript Configuration
Next, we set up our Vue.js application and configure the v-select
component using the Vue instance. Here's the JavaScript part of the code:
<script>
new Vue({
el: '#app',
vuetify: new Vuetify(),
data() {
return {
selectedSchools: [],
schoolNames: [
'John Burroughs School',
'MICDS (Mary Institute and Saint Louis Country Day School)',
'Ladue Horton Watkins High School',
'Clayton High School',
'Parkway West High School'
]
};
}
})
</script>
In this code snippet, we create a new Vue instance and define the selectedSchools data property to store the selected schools. We also provide an array of school names in the schoolNames property. The v-select element is configured with the v-model directive to bind it to the selectedSchools property. The "multiple" and "chips" attributes are used to enable multiple selections and display selected items as chips
Output of Vuetify V-Select multiple example
Conclusion
In this post, we've demonstrated how to use Vuetify's v-select component with the "multiple" feature to enable multiple selections. It's a straightforward way to allow users to choose multiple items from a list, and Vuetify's Material Design styling makes it look polished and user-friendly. This example can be a starting point for more complex applications that require multiple selections.