A Vue Autocomplete Component That Abbreviations

A Vue Autocomplete Component That Abbreviations

A Vue Autocomplete component that autocompletes abbreviations/acronyms by description rather than the abbreviation text.

Abbreviation-Autocomplete

A Vue Autocomplete component that autocompletes abbreviations/acronyms by description rather than the abbreviation text.

Props

data

The autocomplete options

The options are an array of objects in the form

{
  a: "Abbreviation or Acronym",
  d: "Definition or Description"
}

e.g.

[
  {
    a: "ATL",
    d: "Hartsfield–Jackson Atlanta International Airport"
  },
  {
    a: "LAX",
    d: "Los Angeles International Airport"
  }
]
limit(Optional)

The autocomplete results limit Infinity by default

min-input-length(Optional)

The minimum number of characters typed before autocomplete results are displayed 1 by default

JS
const autocomplete = new Vue({
  el: '#app',
  data: {
    abbreviations: [
      {
        a: 'AF',
        d: 'Afghanistan'
      },
      {
        a: 'AL',
        d: 'Albania'
      },
      {
        a: 'DZ',
        d: 'Algeria'
      },
      {
        a: 'AS',
        d: 'American Samoa'
      },
      {
        a: 'AD',
        d: 'Andorra'
      },
      {
        a: 'AO',
        d: 'Angola'
      },
      {
        a: 'AI',
        d: 'Anguilla'
      },
      {
        a: 'AQ',
        d: 'Antarctica'
      },
      {
        a: 'AG',
        d: 'Antigua and Barbuda'
      },
      {
        a: 'AR',
        d: 'Argentina'
      },
      {
        a: 'AM',
        d: 'Armenia'
      },
      {
        a: 'AW',
        d: 'Aruba'
      },
      {
        a: 'AU',
        d: 'Australia'
      },
      {
        a: 'AT',
        d: 'Austria'
      },
      {
        a: 'AZ',
        d: 'Azerbaijan'
      }
    ]
  }
})
Template
<abbreviation-autocomplete :data="abbreviations" :limit="10" :min-input-length="2"></abbreviation-autocomplete>

Demo

Download

vue vue-autocomplete autocomplete-abbreviations vue-js

What's new in Bootstrap 5 and when Bootstrap 5 release date?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Random Password Generator Online

HTML Color Picker online | HEX Color Picker | RGB Color Picker

Collection of Good Vue Autocomplete Components for Your Vue.js App

The Vue AutoComplete component helps users by providing a list of suggestions to select from as they type. It supports data binding, filtering, and more.

10 Best Vue Icon Component For Your Vue.js App

In this article, I will collect 10 Vue icon component to bring more interactivity, better UI design to your Vue application.

Collection of 10 Vue Markdown Component for Vue.js App in 2020

Markdown is a way to style text on the web. The 10 Vue markdown components below will give you a clear view.

Collection of 15 Vue Input Component for Your Vue.js App

Vue input component gives you a baseline to create your own custom inputs. It consists of a prepend/append slot, messages, and a default slot. In this article I will share 15 Vue input components to you.

Simple shopping cart with Vue.js and Deno.js

Simple shopping cart with Vue.js and Deno.js.