GithubHelp home page GithubHelp logo

sonht2219 / vue-tags-input Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vojtechlanka/vue-tags-input

0.0 0.0 0.0 957 KB

A tags input component for VueJS

Home Page: http://www.vue-tags-input.com

JavaScript 79.49% Vue 16.91% SCSS 3.60%

vue-tags-input's Introduction

vue-tags-input

This is forked component from https://github.com/JohMun/vue-tags-input with added drag and drop support.

This is forked component from https://github.com/VojtechLanka/vue-tags-input with added drag and drop options support.

Features

  • No dependencies
  • Custom validation rules
  • Hooks: Before adding, Before deleting ...
  • Edit tags after creation
  • Fast setup
  • Works with Vuex
  • Autocompletion
  • Many customization options
  • Own templates
  • Delete tags on backspace
  • Add tags on paste
  • Examples & Docs
  • Drag and Drop

Install

NPM

npm i @sonht2219/vue-tags-input

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.

  • draggable-group: define group
  • draggable-animation: define animation
<template>
  <div>
    <vue-tags-input
      v-model="tag"
      :tags="tags"
      :is-draggable="true"
      :draggable-group="{name: 'tags', pull: clone, put: false}"
      :draggable-animation="200"
      @tags-changed="newTags => tags = newTags"
      @tag-order-changed="newTags => tags = newTags"
    />
  </div>
</template>
<script>
import VueTagsInput from '@vojtechlanka/vue-tags-input';

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

License

MIT

Copyright (c) 2019 Johannes Munari

vue-tags-input's People

Contributors

johmun avatar vojtechlanka avatar calvin-huang avatar sonht2219 avatar kurbar avatar adrianjost avatar fgilio avatar psalaets avatar zgabievi avatar qiangbro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.