MCPcopy
hub / github.com/shentao/vue-multiselect

github.com/shentao/vue-multiselect @v3.5.0 sqlite

repository ↗ · DeepWiki ↗ · release v3.5.0 ↗
4,113 symbols 13,347 edges 83 files 23 documented · 1%
README

vue-multiselect

Documentation for version 3 (Compatible with Vue 3)

Documentation for v3.0.0 is almost the same as for v2.x as it is mostly backward compatible. For the full docs for v3 and previous versions, check out: vue-multiselect.js.org

Sponsors

GetForm Logo

Suade Logo

Storyblok

Vue Mastery Logo

Features & characteristics:

  • Vue 3 Compatible
  • NO dependencies
  • Single select
  • Multiple select
  • Tagging
  • Dropdowns
  • Filtering
  • Search with suggestions
  • Logic split into mixins
  • Basic component and support for custom components
  • V-model support
  • Vuex support
  • Async options support
  • Fully configurable (see props list below)

Install & basic usage

npm install vue-multiselect
<template>



    <VueMultiselect
      v-model="selected"
      :options="options">
    </VueMultiselect>



</template>

<script>
import VueMultiselect from 'vue-multiselect'
export default {
  components: { VueMultiselect },
  data () {
    return {
      selected: null,
      options: ['list', 'of', 'options']
    }
  }
}
</script>

<style src="https://github.com/shentao/vue-multiselect/raw/v3.5.0/vue-multiselect/dist/vue-multiselect.css"></style>

JSFiddle

Example JSFiddle – Use this for issue reproduction.

Examples

Single select / dropdown

<VueMultiselect
  :model-value="value"
  :options="source"
  :searchable="false"
  :close-on-select="false"
  :allow-empty="false"
  @update:model-value="updateSelected"
  label="name"
  placeholder="Select one"
  track-by="name"
/>

Single select with search

<VueMultiselect
  v-model="value"
  :options="source"
  :close-on-select="true"
  :clear-on-select="false"
  placeholder="Select one"
  label="name"
  track-by="name"
/>

Multiple select with search

<VueMultiselect
  v-model="multiValue"
  :options="source"
  :multiple="true"
  :close-on-select="true"
  placeholder="Pick some"
  label="name"
  track-by="name"
/>

Tagging

with @tag event

<VueMultiselect
  v-model="taggingSelected"
  :options="taggingOptions"
  :multiple="true"
  :taggable="true"
  @tag="addTag"
  tag-placeholder="Add this as new tag"
  placeholder="Type to search or add tag"
  label="name"
  track-by="code"
/>

addTag (newTag) {
  const tag = {
    name: newTag,
    code: newTag.substring(0, 2) + Math.floor((Math.random() * 10000000))
  }
  this.taggingOptions.push(tag)
  this.taggingSelected.push(tag)
},

Asynchronous dropdown

<VueMultiselect
  v-model="selectedCountries"
  :options="countries"
  :multiple="multiple"
  :searchable="searchable"
  @search-change="asyncFind"
  placeholder="Type to search"
  label="name"
  track-by="code"
>
  <template #noResult>
    Oops! No elements found. Consider changing the search query.
  </template>
</VueMultiselect>
methods: {
  asyncFind (query) {
    this.countries = findService(query)
  }
}

⚠️ Build Tool Compatibility

vue-multiselect requires Vue's Options API to function properly. There are known issues with certain versions of @vitejs/plugin-vue that may inadvertently disable the Options API.

Known Issue with @vitejs/plugin-vue

If you're experiencing issues after updating @vitejs/plugin-vue to version 5.2.2 or later, consider downgrading to version 5.2.1:

npm install @vitejs/plugin-vue@5.2.1

This issue occurs because changes in the plugin's configuration handling can disable the Options API even when not explicitly configured. See issue #1901 for more details.

Special Thanks

Thanks to Matt Elen for contributing this version!

A Vue 3 upgrade of @shentao's vue-mulitselect component. The idea is that when you upgrade to Vue 3, you can swap the two components out, and everything should simply work. Feel free to check out our story of how we upgraded our product to Vue 3 on our blog at suade.org

Contributing

# distribution build with minification
npm run bundle

# run unit tests
npm run test

Extension points exported contracts — how you extend this code

MultiselectMixinProps (Interface)
(no doc)
index.d.ts
PointerMixinProps (Interface)
(no doc)
index.d.ts
ComponentProps (Interface)
(no doc)
index.d.ts

Core symbols most depended-on inside this repo

n
called by 1317
documentation/v2/static/js/vendor.d93ab027bb590d46d94a.js
n
called by 1317
docs/v2/static/js/vendor.d93ab027bb590d46d94a.js
push
called by 441
docs/assets/index-ed4a66df.js
r
called by 292
documentation/v2/static/js/vendor.d93ab027bb590d46d94a.js
r
called by 292
docs/v2/static/js/vendor.d93ab027bb590d46d94a.js
n
called by 216
documentation/v1/static/js/app.afd354496e6743d6c34f.js
n
called by 216
docs/v1/static/js/app.afd354496e6743d6c34f.js
Y
called by 169
docs/v1/static/js/app.afd354496e6743d6c34f.js

Shape

Function 3,195
Method 729
Class 186
Interface 3

Languages

TypeScript100%

Modules by API surface

docs/assets/index-f7c67611.js901 symbols
docs/assets/index-ed4a66df.js901 symbols
docs/assets/index-82d61048.js901 symbols
documentation/v2/static/js/vendor.d93ab027bb590d46d94a.js392 symbols
docs/v2/static/js/vendor.d93ab027bb590d46d94a.js392 symbols
documentation/v1/static/js/app.afd354496e6743d6c34f.js198 symbols
docs/v1/static/js/app.afd354496e6743d6c34f.js198 symbols
src/multiselectMixin.js36 symbols
src/pointerMixin.js14 symbols
documentation/v2/static/js/app.d5f70c4a7a04cc78e0cb.js7 symbols
documentation/v2/static/js/app.8389de226372cbfdda24.js7 symbols
documentation/v2/static/js/app.4264536f4c748a4003cd.js7 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

@babel/eslint-parser7.25.9 · 1×
@vitejs/plugin-vue4.2.3 · 1×
@vue/cli-plugin-babel5.0.8 · 1×
@vue/cli-plugin-eslint5.0.8 · 1×
@vue/cli-plugin-unit-jest5.0.8 · 1×
@vue/cli-service5.0.8 · 1×
@vue/test-utils2.0.0-0 · 1×
@vue/vue3-jest27.0.0 · 1×
core-js3.6.5 · 1×
csso5.0.5 · 1×
eslint-config-standard17.1.0 · 1×
eslint-plugin-html6.0.0 · 1×

For agents

$ claude mcp add vue-multiselect \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact