VueTypeahead
See a live demo here.
Install
NPM
Available through npm as vue-typeahead
.
npm install --save vue-typeahead
Also, you need to install a HTTP client like
axios
.
Usage
If you are using vue@1.0.22+
, you could use the new extends
property (see below).
Otherwise, the mixins
way also works.
<!-- optional indicators --> <!-- the input field --> <!-- the list --> <!-- for vue@1.0 use: ($item, item) -->
Key Actions
Down Arrow: Highlight the previous item.
Up Arrow: Highlight the next item.
Enter: Hit on highlighted item.
Escape: Hide the list.
States
loading: Indicates that awaits the data.
isEmpty: Indicates that the input is empty.
isDirty: Indicates that the input is not empty.
Useful if you want to add icon indicators (see the demo)
License
VueTypeahead is released under the MIT License. See the bundled LICENSE file for details.