Simple Tag Input Using Typeahead Autocomplete Built With Vue.js

Voerro Tags Input is a fully configurable Vue.js tag input that comes with an easy-to-use autocomplete/write the function as you type. 

typeahead tags input autocomplete ajax, vue javascript tags input, bootstrap tags input cdn, tags input in css and javascript, get all input tags javascript

How to make use of it:

Install and download:

# Yarn
$ yarn add @voerro/vue-tagsinput

# NPM
$ npm i @voerro/vue-tagsinput --save

1. Import and register the vue-tagsinput component.

import VoerroTagsInput from '@voerro/vue-tagsinput';
Vue.component('tags-input', VoerroTagsInput);

2. Import the desired style sheet.

@import './dist/style.css';
// or
<link rel="stylesheet" href="/dist/style.css" />

3. Add vue-tagsinput to the application template, select the predefined tags, and specify whether to enable the autocomplete function.

<tags-input element-id="tags"
  v-model="selectedTags"
  :existing-tags="[
    { key: 'react', value: 'React' },
    { key: 'angular', value: 'Angular' },
    { key: 'vue', value: 'Vue' },
  ]"
  :typeahead="true">
</tags-input>

4. Component props available to configure tag input.

elementId: String,
inputId: String,
existingTags: {
  type: Array,
  default: () => {
      return [];
  }
},
value: {
  type: Array,
  default: () => {
      return [];
  }
},
idField: {
  type: String,
  default: 'key',
},
textField: {
  type: String,
  default: 'value',
},
valueFields: {
  type: String,
  default: null,
},
disabled: {
  type: Boolean,
  default: false
},
typeahead: {
  type: Boolean,
  default: false
},
typeaheadStyle: {
  type: String,
  default: 'badges'
},
typeaheadActivationThreshold: {
  type: Number,
  default: 1
},
typeaheadMaxResults: {
  type: Number,
  default: 0
},
typeaheadAlwaysShow: {
  type: Boolean,
  default: false
},
typeaheadShowOnFocus: {
  type: Boolean,
  default: true
},
typeaheadHideDiscard: {
  type: Boolean,
  default: false
},
typeaheadUrl: {
  type: String,
  default: ''
},
placeholder: {
  type: String,
  default: 'Add a tag'
},
discardSearchText: {
  type: String,
  default: 'Discard Search Results'
},
limit: {
  type: Number,
  default: 0
},
hideInputOnLimit: {
  type: Boolean,
  default: false
},
onlyExistingTags: {
  type: Boolean,
  default: false
},
deleteOnBackspace: {
  type: Boolean,
  default: true
},
allowDuplicates: {
  type: Boolean,
  default: false
},
validate: {
  type: Function,
  default: () => true
},
addTagsOnComma: {
  type: Boolean,
  default: false
},
addTagsOnSpace: {
  type: Boolean,
  default: false
},
addTagsOnBlur: {
  type: Boolean,
  default: false
},
wrapperClass: {
  type: String,
  default: 'tags-input-wrapper-default'
},
sortSearchResults: {
  type: Boolean,
  default: true
},
caseSensitiveTags: {
  type: Boolean,
  default: false
},
beforeAddingTag: {
  type: Function,
  default: () => true
},
beforeRemovingTag: {
  type: Function,
  default: () => true
},

Tags Input With Typeahead Support, Voerro Vue Tags Input Plugin/Github


See Demo And Download

Official Website(voerro): Click Here

This superior jQuery/javascript plugin is developed by voerro. For extra advanced usage, please go to the official website.

Related Posts

Confetti-Falling-Animation-Effect-party

Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…

jquery-cookie-consent

Simple jQuery Cookie Consent Plugin

jquery.cookie-consent is a simple jQuery plugin to request consent to use cookies. An easy-to-use and highly customizable cookie consent bar that informs your visitors of the use…

Timepicker-Plugin-for-jQuery

Timepicker JavaScript Plugin for jQuery Inspired by Google Calendar

jquery.timepicker is a lightweight jQuery timer plugin inspired by Google Calendar. It supports both mouse and keyboard navigation and weighs 5.5KB minified and compact. Features: Highly customizable…

angular-ngx-carousel-slider

A Lightweight, Touchable, and Responsive Angular Universal Carousel Library

ngxCarousel is a lightweight, tactile, and responsive library for creating an angular carousel. No dependencies, no more hammer. Must Read: Angular Responsive Image Slider With Lightbox Popup…

vue-fullpage-modal

First Mobile Full-screen Modal Popup Library For Vue

Vue full-page modal is a responsive, mobile-compatible, screen-friendly pop-up library for Vue.js. Must Read: Modal Component Is Written in Vanilla JS | ensemble Modal How to make…

random-number-picker

Generate a Random Number Picker In Vanilla JavaScript

Random Number Picker is a Vanilla JS-based number picker that allows you to generate a random number within a specified range. Must Read: Generating Lottery Numbers Using…