Skip to content
This repository was archived by the owner on Nov 27, 2018. It is now read-only.

Ginhing/vue-tagsinput

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A tags input component based on Vue.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published