Skip to content

artyprog/vue-select

 
 

Repository files navigation

vue-select Build Status Code Coverage No Dependencies MIT License Current Release

A native Vue.js select component that provides similar functionality to Select2 without the overhead of jQuery.

Features

  • AJAX Support
  • Tagging
  • List Filtering/Searching
  • Supports Vuex
  • Select Single/Multiple Options
  • Bootstrap Friendly Markup
  • +95% Test Coverage

Documentation

Install & Basic Usage

Vue Compatability

  • vue-select ~2.0 is compatible with vue ~2.0
  • vue-select ~1.0 is compatible with vue ~1.0

NPM

$ npm install vue-select
<template>
   <div>
      <v-select v-model="select" :options="options"></v-select>
   </div>
</template>

<script>
import vSelect from 'vue-select'
export default {
  components: {vSelect},
  data() {
     return {
        selected: null,
        options: ['foo','bar','baz']
     }
  }
}
</script>

CDN/Browser Globals

Just include vue & vue-select.js - I recommend using unpkg.

<!-- use the latest release -->
<script src="https://unpkg.com/vue-select@latest"></script>
<!-- or point to a specific release -->
<script src="https://unpkg.com/vue-select@1.3.3"></script>

Then register the component in your javascript:

Vue.component('v-select', VueSelect.VueSelect);

From there you can use as normal. Here's an example on JSBin.

For more information, please visit the vue-select documentation.

About

A native Vue.js component that provides similar functionality to Select2 without the overhead of jQuery.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 70.6%
  • Vue 27.8%
  • HTML 1.6%