Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@savingsunited/vue3-tags-input

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@savingsunited/vue3-tags-input

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

  • 3.0.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
432
increased by10.77%
Maintainers
3
Weekly downloads
 
Created
Source

vue-tags-input

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

Forked from @johmun/vue-tags-input, which you should use instead if your project is on Vue 2.

Demo & Docs (for the original version)

Features

  • No dependencies
  • Custom validation rules
  • Hooks: Before adding, Before deleting ...
  • Edit tags after creation
  • Fast setup
  • Works with Vuex
  • Small size: 34kb minified (css included) | gzipped 9kb
  • Autocompletion
  • Many customization options
  • Own templates
  • Delete tags on backspace
  • Add tags on paste
  • Examples & Docs
  • Drag and Drop

Install

NPM

npm install @sipec/vue3-tags-input

CDN

<script src="https://unpkg.com/@sipec/vue3-tags-input/dist/vue-tags-input.js"></script>

Usage

<template>
  <div>
    <vue-tags-input
      v-model="tag"
      :tags="tags"
      @tags-changed="newTags => tags = newTags"
    />
  </div>
</template>
<script>
import VueTagsInput from "@sipec/vue3-tags-input";

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

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>

Migration From Vue 2

This version is faithful to the original spec. The only thing you'll have to change is replacing any usages of tags.sync with vmodel:tags in the props

License

MIT

Copyright (c) 2019 Johannes Munari

Keywords

FAQs

Package last updated on 04 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc