Skip to content

Latest commit

 

History

History
57 lines (46 loc) · 1.21 KB

README.md

File metadata and controls

57 lines (46 loc) · 1.21 KB

vue-tagsinput

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

TODO: work with Vue 2.0

Requirement

  • vue: ^1.0.0

Usage

<div id="example">
    <tags-input
        :tags.sync="tags"
        :insert="insertTag"
        :render="renderTag"
        :read-only="setRO"
        :validator="validator"
        track-by="text"
    ></tags-input>
</div>

Example

Live example

Props

  • tags(array, required): to contain your tags
  • klass(object): override the class name (see below)
  • insert(func): transform the text of tag-object before insert your tags-array
  • render(func): transform your tag-object into a text to display
  • readOnly(func): set your tag-object read only or not
  • validator(func|string): set the DOM element of tag having attribute 'invalid' or not
  • trackBy(string): a field of tag-object to dedupe.

Events

  • focus.vue-tagsinput
  • blur.vue-tagsinput

Class Names

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

License

MIT