vue-tagsinput

a tags input component based on Vue.js
1,392 74
Install
npm install vue-tagsinput
Latest Version:2.0.1
Vue:2
Older releases:1
License:MIT
Last Updated:May 25, 2018
Links: GitHub  ·  npm
Maintainer: ginhing

vue-tagsinput

kerboard supported(left, right, backspace, tab).

Requirement

  • vue: ^2.1.0

Usage

<div id="example">
    <tags-input
        :tags="tags"
        @tags-change="handleChange"
    ></tags-input>
</div>

Example

Live example

Props

  • tags(array<{ text: string, readOnly: ?boolean, invalid: ?boolean }>, required): your tags to render
  • placeholder(string): a hint to the user
  • klass(object): override the class name (see below)

Events

  • tags-change: (index: number, text: ?string) => void text will be undefined if the tag was removed
  • focus: (index: number) => void
  • blur: (index: number) => void

Class Names

{
    container: 'tags-input',
    input: 'input',
    placeholder: 'placeholder',
    gap: 'gap',
    tag: 'tag'
}

Migration from 0.x

Because of the two-way props was obsoleted in Vue@2, we should deal with tags by one-way props and onChange callback explicitly. So most states will be handled in your scope. See the full example.

License

MIT

Related Packages

@voerro/vue-tagsinput

A simple tags input with typeahead made with Vue.js 2

180,516 467
atalevue

a vue module

1,819
vue-slug-input

An input that transforms strings to slugs

12,733 0
@justfork/maska

Simple zero-dependency input mask for Vue.js and vanilla JS

4,780 2,021
ofcold-vue-security-code

A powerful security code input supports dynamic configuration of the number of i...

4,292 61

Version History

Version Released Vue License
2.0.1 ^2.1.10 MIT
0.3.3 ^1.0.21 MIT
0.3.1 ^1.0.21 MIT
0.3.0 ^1.0.21 MIT
0.2.2 ^1.0.21 MIT
Pre-releases (2)
Version Released Vue License
2.0.0-beta2 2.1 MIT
2.0.0-beta1 2.1 MIT