GitHub - 777genius/vue-cool-select: Select with autocomplete, slots, bootstrap and material design themes. (original) (raw)

Coverage Downloads Version License CircleCI Build Status Language grade: JavaScript codebeat badge codebeat badge Downloads Contributors

The current version is 3.x, if you are looking for 2.x, you can find it here (also, see breaking changes).

Demo + Documentation

Features

Write your suggestions, glad to add.

Installation

yarn add vue-cool-select or npm install --save vue-cool-select

Get started

NPM

  1. 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" theme import 'vue-cool-select/dist/themes/bootstrap.css' // paste the line below only if you need "material-design" theme import 'vue-cool-select/dist/themes/material-design.css' // you can also import your theme

Vue.use(CoolSelectPlugin)

  1. Use inside another component:

import { CoolSelect } from 'vue-cool-select'

export default { components: { CoolSelect }, data () { return { // simple example of items items: ['Item 1', 'Item 2', 'Item 3'], // there will be a selected item selected: null } } }

  1. Add to <template>:

Browser (CDN)

Include vue-cool-select in the page.

If Vue is detected in the Page, the plugin is installed automatically.


Documentation and examples here.

TODO

I am happy to add something or improve, you can write what you want to see. I also have more motivation to work if you give a star, thanks! 😄