How to use multiselect in vue.js

In this article, we’ll look at how the Vue-Multiselect library can help improve our dropdown menus also how we can use multiselect in different way in vue.js.

Getting Started

  • To get started, we can install Vue-Multiselect by running:
npm install vue-multiselect --save
  • We can also add the library via script tags and add the CSS that’s associated with the package :
<script src=""></script>
<link rel="stylesheet" href="">
  • Create multiselect.vue in component folder
  • So your multiselect.vue looks like below :
  <div class="row my-container">
    <div class="col-md-4">
      <label class="typo__label"
        >Please Select Preferabble Programing Language</label
        tag-placeholder="Add this as new tag"
        placeholder="Select Programming Language"

import Multiselect from "vue-multiselect";

export default {
  components: {
  data() {
    return {
      value: [{ label: "Javascript", id: "1" }],
      options: [
        { label: "Vue.js", id: "2" },
        { label: "C#", id: "3" },
        { label: "React.js", id: "4" },

<style scoped>
    justify-content: center;
  • App.vue
  <div id="app">

import Multiselect from './components/multiselect.vue'

export default {
  name: 'App',
  components: {

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
  • main.js
import Vue from 'vue'
import App from './App.vue'
import BootstrapVue from "bootstrap-vue";
import "bootstrap/dist/css/bootstrap.css";
import "bootstrap-vue/dist/bootstrap-vue.css";

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  • Output :







Submit a Comment

Your email address will not be published. Required fields are marked *


Select Categories