Vue Select is a lightweight, extensible Vue component designed to replace the native HTML `<select>` element, offering enhanced features like filtering, tagging, and AJAX support. The project currently maintains two major lines: the stable version 3.x (latest 3.20.4), which exclusively supports Vue 2, and the actively developed beta channel 4.x (currently 4.0.0-beta.6), which targets Vue 3. While version 3.x receives maintenance updates for critical bug fixes, the primary development effort is focused on the Vue 3 compatible 4.x branch. It differentiates itself by being dependency-free at runtime (aside from Vue itself), highly customizable via slots and SCSS variables, and built with strong emphasis on accessibility. Releases for v3.x have become less frequent as v4.x development progresses towards a stable release, which will likely become the new default for Vue 3 projects.
npm install vue-selectVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install `vue-select@beta` (for Vue 3), import, globally register the component, and include its essential CSS for basic usage.
For Vue 2 projects, use `npm install vue-select`. For Vue 3 projects, use `npm install vue-select@beta`.
Adjust your import statement based on your Vue version and installed `vue-select` version. Use `vSelect` for Vue 2/v3.x and `VueSelect` for Vue 3/v4.x.
Add `import 'vue-select/dist/vue-select.css';` to your main JavaScript/TypeScript entry file or a global CSS file, or use `@import 'vue-select/dist/vue-select.css';` in your Vue component's style block.
Prefer `import vSelect from 'vue-select'` (Vue 2) or `import { VueSelect } from 'vue-select'` (Vue 3) over `const vSelect = require('vue-select')`.Monitor the official GitHub repository and documentation for updates regarding the stable release of v4.0.0. Consider locking the beta version to a specific patch for stability.
Ensure you have correctly registered the component globally (e.g., `Vue.component('v-select', vSelect)` for Vue 2 or `app.component('v-select', VueSelect)` for Vue 3) or declared it in the `components` option of your Vue component.Add `import 'vue-select/dist/vue-select.css';` to your main JavaScript/TypeScript entry file, or use `@import 'vue-select/dist/vue-select.css';` in a global stylesheet or component style block.
Do not use `Vue.use()` with `vue-select`. Instead, register it directly as a component: `Vue.component('v-select', vSelect)` for Vue 2, or `app.component('v-select', VueSelect)` for Vue 3.