Home » Vuejs Multiple Items Select Box Example

Vuejs Multiple Items Select Box Example

Today, We want to share with you Vuejs Multiple Items Select Box.In this post we will show you vue multiselect checkbox, hear for Vue MultiSelect Dropdown Component we will give you demo and example for implement.In this post, we will learn about Vue js: Multiple options selection with an example.

Vuejs Multiple Items Select Box

There are the Following The simple About Vuejs Multiple Items Select Box Full Information With Example and source code.

As I will cover this Post with live Working example to develop vue multiselect list is empty, so the vue multiselect checkbox for this example is following below. : https://jsfiddle.net/mrn3ddf3/10/

Read Also:  Simple Create WordPress Plugin Tutorial

Vue js: Multiple options selection

HTML Part

<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
  <div class='container' id='app'>
    <h2>{{"title".toUpperCase()}}</h2>
    <p class='center help-text' v-if="multiple === 'true'">(Use ctrl or cmd to select multiple)</p>
    <select
      multiple="true"
      v-bind:class="{ 'fix-height': multiple === 'true' }"
      v-model="multipleSelections"
      >
      <option
        v-for="asset in members"
        :value="asset">
        {{asset}}
      </option>
    </select>
    {{ multipleSelections }}
  </div>

JS part

new Vue({
	el:'#app',
  data: function() {
    return {
      multipleSelections: ["Mr jigar (Facebook)"],
      data: null,
      multiple: "true",
      members:["Mr jigar (Facebook)", "Mr Jaydeep (Facebook)", "Mrs Dimples (Facebook)"]
    }
  },
//  props: ['members','title', 'multiple'],
  created() {
    console.log("selections: ",this.multipleSelections);
  }
});

Style.css

* {
  font-family: Roboto;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
}
p.center {
  text-align: center;
}
p.help-text {
  margin:
}
.container {
  width: 250px;
  background: white;
  box-shadow: 1px 1px 3px #000;
  padding: 15px;
}
h2 {
  text-align: center;
  margin: 0;
  padding: 15px 0 5px 0;
}
select {
  padding: 3px;
  width: 100%;
  border-radius: 3px;
}
select.fix-height {
  height: 100px;
}
options {
  padding: 15px;
  margin: 2px;
  border:1px solid #060000;
  background: linear-gradient(rgb(255,255,255), rgb(224,224,224));
  color: #060000;
  border-radius: 3px;
  box-shadow: 0 0 3px #000;
  cursor: pointer;
}
options.active {
  border:1px solid white;
  background: linear-gradient(#0e4f9a, #052f60);
  color: white;
}

Angular 6 CRUD Operations Application Tutorials

Read :

Read Also:  Regular Expressions - string Array json RegExp Object

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Vuejs Multiple Items Select Box.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.


Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Get selected option text with Vue JS Example
  2. Read Also:  how to check a plugin is activated or not in wordpress
  3. Read Also:  PHP Parse URL Querystring Into Array
  4. Read Also:  MySQL MULTIPLE INNER JOINS Example
  5. Read Also:  Vuejs Dropdown Component with example
  6. Read Also:  vuejs Radio Button on Form Submit Example
  7. Read Also:  How to Open URL in New Tab using CakePHP
  8. Read Also:  vue Select Box binding Example
  9. Read Also:  WooCommerce Get $product object from product ID
  10. Read Also:  vue Check box binding Example

Leave a Comment

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