Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.
element could do, wrapped up into a lightweight, zero
beta channel: vue-select@beta, and will become the new default when v4 is released. See #1579 for more details!
bash
yarn add vue-select@beta
or use npm
npm install vue-select@beta
`
Then, import and register the component:
`js
main.ts or main.js
import { createApp } from "vue";
import App from "./App.vue";
import { VueSelect } from "vue-select";
createApp(App)
.component("v-select", VueSelect)
.mount("#app");
`
The component itself does not include any CSS. You'll need to include it separately in your Component.vue:
`vue
`
Vue 2 / Vue Select 3.x
Install:
`bash
yarn add vue-select
or use npm
npm install vue-select
`
Then, import and register the component:
`js
import Vue from "vue";
import vSelect from "vue-select";
Vue.component("v-select", vSelect);
`
The component itself does not include any CSS. You'll need to include it separately:
`js
import "vue-select/dist/vue-select.css";
``