3.1.1 • Published 3 months ago

@vojtechlanka/vue-tags-input v3.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
3 months ago

vue-tags-input

A tags input component for Vue 2 and 3 with autocompletion, custom validation, templating and much more.

Forked from @sipec/vue-tags-input which was forked from @johmun/vue-tags-input.

Demo & Docs (for the original version).

Install

Vue 2

npm i @vojtechlanka/vue-tags-input@^2

Vue 3

npm i @vojtechlanka/vue-tags-input@^3

Usage with draggable

Draggable is disabled by default. Set prop :is-draggable to true to enable it. You can also set :draggable-handle to true to enable handle which can be styled with css class .handle. Classes for ghost-class and drag-class are .ghost-tag and .drag-tag.

On drop tag-order-changed is emitted with array of tags in new order. Use this array to update your tags to save the new order.

<template>
  <div>
    <vue-tags-input
      v-model="tag"
      :tags="tags"
      :is-draggable="true"
      @tags-changed="newTags => tags = newTags"
      @tag-order-changed="newTags => tags = newTags"
    />
  </div>
</template>
<script>
// Vue 2
import VueTagsInput from '@vojtechlanka/vue-tags-input';

// Vue 3
import { VueTagsInput } from '@vojtechlanka/vue-tags-input';

export default {
  components: {
    VueTagsInput,
  },
  data() {
    return {
      tag: '',
      tags: [],
    };
  },
};
</script>

License

MIT

Copyright (c) 2019 Johannes Munari

3.1.1

3 months ago

3.1.0

4 months ago

3.0.12

8 months ago

3.0.4

8 months ago

3.0.13

8 months ago

3.0.3

8 months ago

3.0.10

8 months ago

3.0.2

8 months ago

3.0.11

8 months ago

3.0.1

8 months ago

2.1.2-draggable

8 months ago

3.0.8

8 months ago

3.0.7

8 months ago

3.0.14

8 months ago

3.0.6

8 months ago

3.0.15

6 months ago

3.0.5

8 months ago

3.0.0

8 months ago

2.1.3

8 months ago

3.0.9

8 months ago

2.1.1-drraggable

3 years ago

2.1.1-draggable

3 years ago

2.1.0-draggable

4 years ago