You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
props (30) allow you to customize a component in a various ways
slots (13) allow content to be changed anywhere
events (8) will let you know about everything
autocomplete (you can use custom search, you can also disable the search input)
keyboard controls (not only through the arrows)
support on mobile devices
validation, state of error and success
disabled and readonly
small and large sizes (as in bootstrap)
the ability to set your styles, you can write theme from scratch. 2 themes: Bootstrap 4 (equal styles), Material Design
TypeScript support
tab navigation
SSR (Server-Side Rendering)
auto determine the suitable position for the menu if it goes beyond the viewport
Write your suggestions, glad to add.
Installation
yarn add vue-cool-select or npm install --save vue-cool-select
Get started
NPM
Import this plugin, css (theme) and add plugin via Vue.use:
import{CoolSelectPlugin}from'vue-cool-select'// paste the line below only if you need "bootstrap" themeimport'vue-cool-select/dist/themes/bootstrap.css'// paste the line below only if you need "material-design" themeimport'vue-cool-select/dist/themes/material-design.css'// you can also import your themeVue.use(CoolSelectPlugin)
Use inside another component:
import{CoolSelect}from'vue-cool-select'exportdefault{components: { CoolSelect },data(){return{// simple example of itemsitems: ['Item 1','Item 2','Item 3'],// there will be a selected itemselected: null}}}
Add to <template>:
<cool-selectv-model="selected"
:items="items"
/>
Browser (CDN)
Include vue-cool-select in the page.
<scriptsrc="https://unpkg.com/vue-cool-select"></script><!-- paste the line below only if you need "bootstrap" theme --><linkrel="stylesheet" href="https://unpkg.com/vue-cool-select/dist/themes/bootstrap.css"><!-- paste the line below only if you need "material-design" theme --><linkrel="stylesheet" href="https://unpkg.com/vue-cool-select/dist/themes/material-design.css">
If Vue is detected in the Page, the plugin is installed automatically.