@kugatsu/vueautocompleteinput

Vuejs component for autocomplete input
234
Install
npm install @kugatsu/vueautocompleteinput
Latest Version:1.1.1
Vue:2
License:MIT
Last Updated:Jul 15, 2019
Links: GitHub  ·  npm
Maintainer: kugatsu

Autocomplete Vue JS 🚀

The Autocomplete vue component allow you to create select input with autocomplete drop down. You can select with arraow / enter / click or just fill the field.

Demo here => Code Sandbox

demo

How to use it

Install with npm.

npm i @kugatsu/vueautocompleteinput --save

Import with ES6

import VueAutocomplete from "@kugatsu/vueautocompleteinput";

components: {
   VueAutocomplete
},
data: function() {
    return {
        articles: [{id: 1, label: "first items"}],
        article: undefined // or {id: 1, label: "first items"} to initialise
    };
},
<vue-autocomplete :items="articles" v-model="article" property-to-display="label"></vue-autocomplete>

Parameters

Name Type Default value
items String required
v-model Object required
placeholder String Search
emptyResults No result No results
propertyToDisplay String label
disable Boolean false
closeButon Boolean true
classComponent String ""
classInput String "autocomplete-input-custom"
classWrapper String "autocomplete-list-wrapper-custom"
classList String "autocomplete-list-custom"
classItem String "autocomplete-list-item-custom"
classItemActive String "autocomplete-item-active-custom"

Event throw

Event When
selected value is selected
clear input is empty
noResult filter return no value

Slot

  1. Item row You can huse slot to fully customize item row.

Sample 💩:

<template v-slot:listItem="slotProps">
    <h4 style="margin: 0;">{{slotProps.item.title}}</h4>
    <br>
    {{slotProps.item.body}}
</template>
  1. Close btn

Use closeButton scope to personalize your clear button or use autocomplete-clear-btn to surcharge style.

<template v-slot:closeButton>X</template>
Customise

The initial style is very basic to let you the power to custumize and integrate easily the component with your website design.

You have the possibility of surchage class or redifign them.

All class used
Class surchage
autocomplete no
autocomplete-input no
utocomplete-input-custom classInput
autocomplete-list-wrapper no
autocomplete-list-wrapper-custom classWrapper
autocomplete-list no
autocomplete-list-custom classList
autocomplete-list-item no
autocomplete-list-item-custom classItem
autocomplete-item-active-custom classItemActive
search-result-item-disabled no
autocomplete-clear-btn no

Related Packages

vs-autocomplete

Nested-Autocomplete-Multiselect-Dropdown for Vue 3, refer GitHub branch v2 for u...

1,893 2
vue-input-dropdown

A simple to use, highly customizable input dropdown component for Vue

2,968 9
cml-components

My components, for create an ERP model in vue 3 in Ecuador

2,968 1
@kugatsu/vuenotification

Vuejs plugin for handle notification toastr gsap

21,179 50
vue-single-select

single select autocomplete dropdown for vue

12,280 45

Version History

Version Released Vue License
1.1.1 ^2.5.22 MIT
1.1.0 ^2.5.22 MIT
1.0.0 ^2.5.22 MIT
0.1.5 ^2.5.22 MIT