This Nuxt.js module integrates the `vue-multiselect` component into Nuxt applications, simplifying its setup and usage. It handles the automatic global registration of the `Multiselect` component, allowing developers to use `<multiselect>` directly in their Vue templates without manual imports. `vue-multiselect` itself is a popular component for single/multiple selection, tagging, and asynchronous search capabilities, offering extensive customization through props and slots. This specific Nuxt wrapper, currently at version 1.0.4, shows its last significant activity around 2020. Given its reliance on `vue-multiselect` (which primarily supports Vue 2) and the lack of recent updates, `nuxt-vue-multiselect` is not compatible with Nuxt 3 or Vue 3 projects and should be considered abandoned for modern Nuxt development, best suited for existing Nuxt 2 applications.
npm install nuxt-vue-multiselectVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up `nuxt-vue-multiselect` in `nuxt.config.js` and then use the `<multiselect>` component within a Vue template with options for multiple selection.
For Nuxt 3, use a different multiselect component designed for Vue 3, or integrate `vue-multiselect` directly using a custom plugin, ensuring it's a Vue 3 compatible fork or alternative.
Manually import the CSS in your `nuxt.config.js` (e.g., `css: ['vue-multiselect/dist/vue-multiselect.min.css']`) or directly within a root stylesheet or component's `<style>` block using `@import`.
For new projects, consider modern alternatives or manually integrate a maintained Vue 2/3 compatible multiselect component. For existing projects, proceed with caution and consider auditing its dependencies.
If migrating to Vue 3 or Nuxt 3, you must replace `vue-multiselect` with a Vue 3 compatible alternative.
Ensure 'nuxt-vue-multiselect' is present in the `modules` array within your `nuxt.config.js` file and restart your Nuxt development server.
Initialize your `v-model` data property to `null` or `[]` (based on `multiple` prop) and ensure `options` is always an array of objects.
Add `'vue-multiselect/dist/vue-multiselect.min.css'` to the `css` array in `nuxt.config.js`, or manually `@import` it in a global stylesheet.