0.4.2 • Published 4 years ago

vue-awescode-select v0.4.2

Weekly downloads
50
License
-
Repository
github
Last release
4 years ago

awescode-select

Custom select built with Vue.js and Tailwind.css

Demo

To view demo examples locally clone the repo and run npm install and npm run serve
To run tests locally - npm run test:unit

Installation

npm install vue-awescode-select

Usage

Inside your component

<template>
  <vue-awescode-select 
    v-model="value"
    :options="options"
    placeholder="Select"
  />
</template>

<script>
import VueAwescodeSelect from 'vue-awescode-select';

export default {
  components: {
    VueAwescodeSelect,
  },
  data: () => ({
    value: null,
    options: [
      { text: 'Option 1', value: 1 },
      { text: 'Option 2', value: 2 },
    ],
  }),
};
</script>

If you are using Nuxt.js you need to use transpile for this package
Inside nuxt.config.js

export default {
  // Your other settings
  build: {
    transpile: ['vue-awescode-select']
  }
}

API

Props

PropTypeRequiredDefaultDescription
optionsArraytrue-Dropdown options for select. Each object must contain next keys: <String> and value<any>
placeholderstringfalse''Placeholder for select

Events

EventReturnsDescription
@changeObjectIndicates that the value has been changed. NB, this will fire when a default value has been selected when the component is mounted. Use the input event if you want the value the user has selected.
@inputObjectIndicates that the value has been changed by the user.
0.4.2

4 years ago

0.4.1

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.1

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.1.0

4 years ago