Vuejs Multiple Items Select Box Example

Vuejs Multiple Items Select Box

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.

Read Also:  Laravel Redirect Back with() Message

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/

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:  Vue JS Radio Buttons - Use Onlick or Onchange Event?

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.

About Pakainfo

I am Jaydeep Gondaliya, a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by Pakainfo →

Leave a Reply

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