@spicycoding/vue-auto-suggest
v1.0.2
Published
Auto suggest on an input field by providing an array of possible values.
Readme
This vue component displays suggestions based on the current value of the input field.
How to install
Install using NPM: npm install @spicycoding/vue-auto-suggest
Install using Yarn: yarn add @spicycoding/vue-auto-suggest
Important note This package assumes that you have installed these packages:
- font-awesome
- tailwindcss
How to use
import autoSuggest from '@spicycoding/vue-auto-suggest';
new Vue({
components: {
'auto-suggest': autoSuggest,
},
});<auto-suggest placeholder="What are you searching for?" :value="''" :on-input="myMethod" :options="['Netherlands', 'Belgium', 'Germany', 'Italy']"></auto-suggest>In your own application, create a method that accepts one parameter:
myMethod(response) {
console.log(response);
}