{"id":15317707,"url":"https://github.com/mayank1513/tag-input","last_synced_at":"2025-04-14T22:50:38.133Z","repository":{"id":90744515,"uuid":"383092153","full_name":"mayank1513/tag-input","owner":"mayank1513","description":"A versatile tag input component built with Vue 3 Composition API ⛺","archived":false,"fork":false,"pushed_at":"2024-05-25T04:58:26.000Z","size":392,"stargazers_count":19,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T10:54:09.340Z","etag":null,"topics":["tag-input","tags","typescript","upforgrabs","vue","vue3","vue3-composition-api","vue3-typescript","vuejs"],"latest_commit_sha":null,"homepage":"https://vue-tag-input.vercel.app","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mayank1513.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["mayank1513"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://pages.razorpay.com/mayank1513"]}},"created_at":"2021-07-05T09:53:50.000Z","updated_at":"2024-08-20T02:25:11.000Z","dependencies_parsed_at":"2023-09-24T07:26:39.245Z","dependency_job_id":null,"html_url":"https://github.com/mayank1513/tag-input","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayank1513%2Ftag-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayank1513%2Ftag-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayank1513%2Ftag-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayank1513%2Ftag-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mayank1513","download_url":"https://codeload.github.com/mayank1513/tag-input/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975299,"owners_count":21192199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tag-input","tags","typescript","upforgrabs","vue","vue3","vue3-composition-api","vue3-typescript","vuejs"],"created_at":"2024-10-01T08:58:05.054Z","updated_at":"2025-04-14T22:50:38.112Z","avatar_url":"https://github.com/mayank1513.png","language":"Vue","funding_links":["https://github.com/sponsors/mayank1513","https://pages.razorpay.com/mayank1513"],"categories":[],"sub_categories":[],"readme":"# TagInput\n\nA versatile tag input component built with Vue 3 Composition API.\n\n[![Version](https://img.shields.io/npm/v/@mayank1513/vue-tag-input.svg?colorB=green)](https://www.npmjs.com/package/@mayank1513/vue-tag-input) [![codecov](https://codecov.io/gh/mayank1513/tag-input/graph/badge.svg)](https://codecov.io/gh/mayank1513/tag-input) [![Downloads](https://img.jsdelivr.com/img.shields.io/npm/d18m/@mayank1513/vue-tag-input.svg)](https://www.npmjs.com/package/@mayank1513/vue-tag-input) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/@mayank1513/vue-tag-input)](https://www.npmjs.com/package/@mayank1513/vue-tag-input) [![Publish to npm and GitHub](https://github.com/mayank1513/tag-input/actions/workflows/test.yml/badge.svg)](https://github.com/mayank1513/tag-input/actions/workflows/publish-to-npm-on-new-release.yml) [![Get help](codementor.svg)](https://www.codementor.io/@mayank1513?refer=badge)\n\n![tag-input.gif](tag-input.gif)\n\n## Features\n\n- ✅ No dependencies\n- ✅ Input box stays focused - no need to re-focus the input =\u003e better UX\n- ✅ Autocompletion\n- ✅ Use arrow keys to navigate and enter key to select autocompleteItems\n- ✅ Fast setup\n- ✅ Customize tag validator\n- ✅ Works with Vuex\n- ✅ Small size: 1.6 kB gzipped\n- ✅ Many customization options\n- ✅ Delete tags on backspace / delete key\n- ✅ Confirm before delete - tags turns red when backspace is pressed, gets deleted when backspace is pressed again\n- ✅ Works well with copy \u0026 paste\n- ✅ Excellent UX and accessibility\n- ✅ Examples \u0026 Docs\n\nPlease read [this article](https://mayank1513.medium.com/creating-a-tag-input-component-using-the-vue-3-composition-api-feae06d58492) to learn how to build this package step by step and the background story.\n\nTo learn vue js please check out our courses [Vue.js Complete Course + Guide](https://www.udemy.com/course/vuejs-complete-course-plus-guide/?referralCode=93BDA4A1FE3F73C37CD2) and [Vue 3 Essentials](https://www.udemy.com/course/vue-3-essentials/?referralCode=E6D2FDE2B8B06C1991F1)\n\nFollow us on [FaceBook](https://www.facebook.com/Learn-Vue-Js-104953725168718/) to get the latest discount coupons and update to our articles and packages.\n\n\u003e To keep it thin and performant we have chosen to provide only the minified version. Because, that's what you really need. In case you are looking for the full version build your own from this source code as per [Build](#Build) section.\n\n## [live demo](https://vue-tag-input.vercel.app)\n\n## Install\n\n### NPM\n\n```bash\nnpm i @mayank1513/vue-tag-input --production\n```\n\nor\n\n```bash\npnpm i @mayank1513/vue-tag-input --production\n```\n\nor\n\n```bash\nyarn add @mayank1513/vue-tag-input --production\n```\n\n### CDN\n\n```\n\u003cscript src=\"https://unpkg.com/vue@3/dist/vue.global.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/@mayank1513/vue-tag-input\"\u003e\u003c/script\u003e\n\u003clink rel=\"stylesheet\" href=\"https://unpkg.com/@mayank1513/vue-tag-input@1.0.0/dist/style.css\"\u003e\n```\n\n## Usage\n\n### npm\n\n```vue\n\u003ctemplate\u003e\n  ...\n  \u003ctag-input v-model=\"tags\" /\u003e\n  ...\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport TagInput from '@mayank1513/vue-tag-input'\nimport '@mayank1513/vue-tag-input/style.css'\n...\n\nexport default {\n  name: 'App',\n  data() {\n    return {\n      tags: [],\n      ...\n    };\n  },\n  components: {\n    TagInput,\n    ...\n  },\n  ...\n}\n\u003c/script\u003e\n```\n\nDetailed Docs available at (https://vue-tag-input.vercel.app)[https://vue-tag-input.vercel.app]\n\n### cdn\n\nbasic usage\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"UTF-8\" /\u003e\n    \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n    \u003ctitle\u003eVue Tag Input Demo\u003c/title\u003e\n    \u003cscript src=\"https://unpkg.com/vue@3/dist/vue.global.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"https://unpkg.com/@mayank1513/vue-tag-input\"\u003e\u003c/script\u003e\n    \u003clink\n      rel=\"stylesheet\"\n      href=\"https://unpkg.com/@mayank1513/vue-tag-input@1.0.0/style.css\"\n    /\u003e\n  \u003c/head\u003e\n\n  \u003cbody\u003e\n    \u003cdiv id=\"app\"\u003e\n      \u003ctag-input\u003e\u003c/tag-input\u003e\n    \u003c/div\u003e\n  \u003c/body\u003e\n  \u003cscript\u003e\n    Vue.createApp({\n      components: {\n        TagInput,\n      },\n    }).mount(\"#app\");\n  \u003c/script\u003e\n\u003c/html\u003e\n```\n\n#### advanced usage\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"UTF-8\" /\u003e\n    \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n    \u003ctitle\u003eDocument\u003c/title\u003e\n    \u003cscript src=\"https://unpkg.com/vue@3/dist/vue.global.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"https://unpkg.com/@mayank1513/vue-tag-input\"\u003e\u003c/script\u003e\n    \u003clink\n      rel=\"stylesheet\"\n      href=\"https://unpkg.com/@mayank1513/vue-tag-input@1.0.0/style.css\"\n    /\u003e\n    \u003cstyle\u003e\n      #app {\n        font-family: Avenir, Helvetica, Arial, sans-serif;\n        -webkit-font-smoothing: antialiased;\n        -moz-osx-font-smoothing: grayscale;\n        text-align: center;\n        color: #2c3e50;\n        margin-top: 60px;\n        max-width: 1400px;\n        margin: auto;\n      }\n\n      .main {\n        text-align: start;\n      }\n    \u003c/style\u003e\n  \u003c/head\u003e\n\n  \u003cbody\u003e\n    \u003cdiv id=\"app\"\u003e\n      \u003cimg\n        class=\"logo\"\n        alt=\"Krishna Apps logo\"\n        src=\"https://raw.githubusercontent.com/mayank1513/tag-input/master/src/assets/logo.png\"\n      /\u003e\n      \u003cbr /\u003e\n      \u003ch2\u003ePresents\u003c/h2\u003e\n      \u003ch1\u003eVue Tag Input\u003c/h1\u003e\n      \u003chr /\u003e\n      \u003cdiv class=\"main\"\u003e\n        \u003ch1\u003eDefault options\u003c/h1\u003e\n        \u003ctag-input v-model=\"tags\" /\u003e\n        \u003cbr /\u003e\n        \u003cspan\n          \u003eUse \u003ccode\u003eenter\u003c/code\u003e key or \u003ccode\u003etab\u003c/code\u003e key to create a new\n          tag.\u003c/span\n        \u003e\n        \u003ch1\u003eWith custom delimiter and colors\u003c/h1\u003e\n        \u003ctag-input\n          tagBgColor=\"lightgreen\"\n          tagTextColor=\"darkgreen\"\n          :customDelimiter=\"customDelimiter\"\n          v-model=\"tags\"\n        /\u003e\n        \u003cbr /\u003e\n        \u003cspan\n          \u003eUse \u003ccode\u003eenter\u003c/code\u003e key or \u003ccode\u003etab\u003c/code\u003e key or any of the\n          custom delimeters to create a new tag.\u003c/span\n        \u003e\n        \u003cp\u003e\n          Custom delimiters:\n          \u003ccode v-for=\"delim in customDelimiter\" :key=\"delim\"\u003e\n            \"{{delim}}\"\u003c/code\n          \u003e\n        \u003c/p\u003e\n        \u003cbr /\u003e\n        \u003ch1\u003eDo not allow custom tags\u003c/h1\u003e\n        \u003ctag-input\n          :autocomplete-items=\"autocompleteItems\"\n          validator=\"onlyAutocompleteItems\"\n          tagBgColor=\"blue\"\n          tagTextColor=\"lightblue\"\n          :customDelimiter=\"customDelimiter\"\n          v-model=\"tags\"\n        /\u003e\n        \u003cbr /\u003e\n        Try entering tag that is not in autocompleteItems and hit\n        \u003ccode\u003eenter\u003c/code\u003e\n        \u003cbr /\u003e\n        \u003cspan\n          \u003eUse \u003ccode\u003eenter\u003c/code\u003e key or \u003ccode\u003etab\u003c/code\u003e key or any of the\n          custom delimeters to create a new tag.\u003c/span\n        \u003e\n        \u003cp\u003e\n          Allowed Tags:\n          \u003ccode v-for=\"tag in autocompleteItems\" :key=\"tag\"\u003e \"{{tag}}\"\u003c/code\u003e\n        \u003c/p\u003e\n        \u003cp\u003e\n          Custom delimiters:\n          \u003ccode v-for=\"delim in customDelimiter\" :key=\"delim\"\u003e\n            \"{{delim}}\"\u003c/code\n          \u003e\n        \u003c/p\u003e\n        \u003cbr /\u003e\n        \u003ch1\u003e\n          Provide autocompleteItems for autofill but also allow custom tags\n        \u003c/h1\u003e\n        \u003ctag-input\n          :autocomplete-items=\"autocompleteItems\"\n          tagBgColor=\"blue\"\n          tagTextColor=\"lightblue\"\n          :customDelimiter=\"customDelimiter\"\n          v-model=\"tags\"\n        /\u003e\n        \u003cbr /\u003e\n        \u003cspan\n          \u003eUse \u003ccode\u003eenter\u003c/code\u003e key or \u003ccode\u003etab\u003c/code\u003e key or any of the\n          custom delimeters to create a new tag.\u003c/span\n        \u003e\n        \u003cp\u003e\n          Allowed Tags:\n          \u003ccode v-for=\"tag in autocompleteItems\" :key=\"tag\"\u003e \"{{tag}}\"\u003c/code\u003e\n        \u003c/p\u003e\n        \u003cp\u003e\n          Custom delimiters:\n          \u003ccode v-for=\"delim in customDelimiter\" :key=\"delim\"\u003e\n            \"{{delim}}\"\u003c/code\n          \u003e\n        \u003c/p\u003e\n        \u003cbr /\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n\n    \u003cscript\u003e\n      Vue.createApp({\n        data() {\n          return {\n            tags: [],\n            customDelimiter: [\",\", \" \"],\n            autocompleteItems: [\n              \"vue\",\n              \"composition\",\n              \"js\",\n              \"mytag1\",\n              \"mayank1513\",\n            ],\n          };\n        },\n        components: {\n          TagInput,\n        },\n      }).mount(\"#app\");\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Build\n\nTo build the example clone the repo `git clone https://github.com/mayank1513/tag-input.git` and run\n\n```\nnpm i \u0026\u0026 npm run build\n// or\npnpm i \u0026\u0026 npm run build\n```\n\n## Contribute\n\n### Todo\n\n- Update docs\n\n## Help us to help you more\n\n- Please start this repo\n- Follow us on [FaceBook](https://www.facebook.com/Learn-Vue-Js-104953725168718/)\n- Upvote our helpful posts on [StackOverflow](https://stackoverflow.com/users/9640177/mayank-kumar-chaudhari)\n- Refer our courses to your colleagues, friends and business leaders\n  - [Vue.js Complete Course + Guide](https://www.udemy.com/course/vuejs-complete-course-plus-guide/?referralCode=93BDA4A1FE3F73C37CD2)\n  - [Vue 3 Essentials](https://www.udemy.com/course/vue-3-essentials/?referralCode=E6D2FDE2B8B06C1991F1)\n- Use our referrals to get advantage of special offers\n  - Open your free demat account with [Groww](https://groww.app.link/refe/mayank-kumar8914309)\n  - Open your demat account with leading discount broker [Zerodha](https://zerodha.com/?c=GG0215\u0026s=CONSOLE)\n  - Buy what you need on [amzon.in](https://www.amazon.in/ref=assoc_aax_fallback_300x250?tag=mayank1513-21\u0026linkCode=ur8) using [our refferal](https://www.amazon.in/ref=assoc_aax_fallback_300x250?tag=mayank1513-21\u0026linkCode=ur8)\n  - Buy what you need on [amazon.com](https://amzn.to/3i2PPsE)\n  - Donate for social cause. We are happy if you help anyone in need. It need not be only us!\n- Want to learn business skills? Checkout [Bada Business](https://www.badabusiness.com/dd/BIMK003866)\n\n## Contribute for a Cause\n\n- [PM Cares Fund](https://www.pmcares.gov.in/en/)\n- [#IamOxygenMan](https://www.badabusiness.com/IamOxygenMan)\n\n![Alt](https://repobeats.axiom.co/api/embed/d45ed140b02466d208243ea6c6773d2a86655eb3.svg \"Repobeats analytics image\")\n\n## License\n\nLicensed as MIT open source. Copyright © 2023 \u003ca href=\"https://mayank-chaudhari.vercel.app\" target=\"_blank\"\u003eMayank Kumar Chaudhari\u003c/a\u003e\n\n\u003chr /\u003e\n\n\u003cp align=\"center\" style=\"text-align:center\"\u003ewith 💖 by \u003ca href=\"https://mayank-chaudhari.vercel.app\" target=\"_blank\"\u003eMayank Kumar Chaudhari\u003c/a\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayank1513%2Ftag-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayank1513%2Ftag-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayank1513%2Ftag-input/lists"}