{"id":14973743,"url":"https://github.com/robrogers3/vue-taggable-select","last_synced_at":"2025-10-27T02:31:23.710Z","repository":{"id":143926804,"uuid":"144672916","full_name":"robrogers3/vue-taggable-select","owner":"robrogers3","description":"A multiple taggable select autocomplete dropdown component for Vue","archived":false,"fork":false,"pushed_at":"2020-10-15T10:06:36.000Z","size":136,"stargazers_count":12,"open_issues_count":9,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T01:33:29.361Z","etag":null,"topics":["dropdown","dropdown-menu","tagging","vue-taggle-select","vuejs"],"latest_commit_sha":null,"homepage":"","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/robrogers3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-14T05:31:10.000Z","updated_at":"2023-04-06T18:55:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"49476498-f4c9-4888-96b2-33c6f62ed83e","html_url":"https://github.com/robrogers3/vue-taggable-select","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"e040c7f7f7083cd837e3cd2eeba7df9a791b0e55"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrogers3%2Fvue-taggable-select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrogers3%2Fvue-taggable-select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrogers3%2Fvue-taggable-select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrogers3%2Fvue-taggable-select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robrogers3","download_url":"https://codeload.github.com/robrogers3/vue-taggable-select/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238422923,"owners_count":19469657,"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":["dropdown","dropdown-menu","tagging","vue-taggle-select","vuejs"],"created_at":"2024-09-24T13:49:20.472Z","updated_at":"2025-10-27T02:31:23.338Z","avatar_url":"https://github.com/robrogers3.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-taggable-select\n\nA Vue component that makes long, unwieldy select boxes user friendly.\n\n[Check out a demo here](https://codesandbox.io/s/18jz68zn77)\n\n## What it Does\n\nvue-taggable-select provides an elegant, user-friendly component to replace long, unwieldy multi select elements. Great for users. Simple for developers.\n\n## How simple?\n\nThis simple:\n\nThis **simple**\n\n```html\n\u003cvue-taggable-select\n    :taggable=\"true\"\n\tv-model=\"fruit\" \n\t:options=\"['apple','cherry','banana','pear', 'tomato']\"\n\u003e\u003c/vue-taggable-select\u003e\n```\n\n\u003cimg style=\"width: 400px\" src=\"https://raw.githubusercontent.com/robrogers3/vue-taggable-select/master/vue-taggable-select.png\"\u003e\n\n\n## What It Does Not Do\n\nNope no regular selects. See vue-single-select for this.\n\n[Vue Single Select](https://www.npmjs.com/package/vue-single-select)\n\nNo ajax loading.\n\n## Usage\n\n### Install and Use Via CDN\n\n```html\n\u003cdiv id=\"app\"\u003e\n    \u003clable\u003eChoose a fruit!\u003c/lable\u003e\n    \u003cvue-taggable-select\n\t    v-model=\"fruit\"\n\t    :options=\"fruits\"\n    \u003e\u003c/vue-taggable-select\u003e\n\u003c/div\u003e\n```\n\n```html\n\u003cscript src=\"https://unpkg.com/vue@latest\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/vue-taggable-select@latest\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n new Vue({\n     el:\"#app\",\n     data: {\n         fruit: null,\n         fruits: ['peach','pear','apple','orange']\n     }\n });\n\u003c/script\u003e\n```\n\n### Install Via NPM\n\n```bash\n$ npm i vue-taggable-select\n```\n\n### Register it\n\nIn your component:\n\n```javascript\nimport VueTaggableSelect from \"vue-taggable-select\";\nexport default {\ncomponents: {\n     VueTaggableSelect\n  },\n  //...\n}\n```\n\nGlobally:\n\n```javascript\nimport VueTaggableSelect from \"vue-taggable-select\";\nVue.component('vue-taggable-select', VueTaggableSelect);\n```\n\n### Use It\n\n```html\n\u003cvue-taggable-select\n    make-it-taggable=\"good!\"\n    :taggable=\"true\"\n    v-model=\"fruit\"\n    :options=\"['apple','banana','cherry','tomato']\"\n    :required=\"true\"\n\u003e\u003c/vue-taggable-select\u003e\n```\n\n### Use It Again\n\n```html\n\u003cvue-taggable-select\n        name=\"maybe\"\n        placeholder=\"pick a post\"\n        you-want-to-select-a-post=\"ok\"\n        v-model=\"post\"\n        out-of-all-these-posts=\"makes sense\"\n        :options=\"posts\"\n        a-post-has-an-id=\"good for search and display\"\n        option-key=\"id\"\n        the-post-has-a-title=\"make sure to show these\"\n        option-label=\"title\"\n\u003e\u003c/vue-taggable-select\u003e\n```\n\n### Use It Again\n\n```html\n\u003cvue-taggable-select\n        you-want-to-select-a-reply=\"yes\"\n        v-model=\"reply\"\n        out-of-all-these-replies=\"yep\"\n        :options=\"replies\"\n        a-reply-only-has-a-reply=\"sounds about right\"\n        option-label=\"reply\"\n        seed-an-initial-value=\"what's seed mean?\"\n        initial=\"seed me\"\n        you-only-want-20-options-to-show=\"is 20 enough?\"\n        :max-results=\"20\"\n\u003e\u003c/vue-taggable-select\u003e\n```\n\n### Dont like the Styling?\n\nYou can override some of it. Like so:\n\n```html\n\u003cvue-taggable-select\n        id=\"selected-reply\"\n        name=\"a_reply\"\n        option-label=\"reply\"\n        v-model=\"reply\"\n        :options=\"replies\"\n        you-like-huge-dropdowns=\"1000px is long!\"\n        max-height=\"1000px\"\n        :classes='{\n            icons: \"icons\"\n            active: \"active\",\n            wrapper: \"multi-select-wrapper\",\n            searchWrapper: \"search-wrapper\",\n            searchInput: \"search-input\",\n            pill: \"pill\",\n            required: \"required\",\n            dropdown: \"dropdown\"\n        }'\n\u003e\u003c/vue-taggable-select\u003e\n```\n\nThen all you need to do is provide some class definitions like so:\n\n```css\n.active {\n\tbackground-color: pink;\n}\n.multi-select-wrapper {\n\tdisplay: block;\n\tfont-size: 16px;\n}\n.search-input {\n\tcolor: black;\n}\n.pill {\n\tpadding: .5em;\n}\n```\n... and so on.\n\n**Note: Bootstrap 3 Users May want to increase the size of the icons.**\n\nIf so do this: \n```css\n.icons svg {\n    height: 1em;\n    width: 1em;\n}\n```\n### Kitchen Sink\n\nMeh, see props below.\n\n## Why vue-taggable-select is better\n\n1.  It handles custom label/value props for displaying options.\n\n    Other select components require you to conform to their format. Which often means data wrangling.\n\n2.  It's easier on the DOM.\n\n    Other components will load up all the options available in the select element. This can be heavy. vue-taggable-select makes an executive decision that you probably will not want to scroll more than N options before you want to narrow things down a bit. You can change this, but the default is 30.\n\n3.  Snappy Event Handling\n\n    - up and down arrows for selecting options\n    - enter to select first match\n    - remembers selection on change\n    - hit the escape key to, well, escape\n    - hit delete to remove the last selection\n\n4.  Lightweight\n\n    - Why are the other packages so big and actually have dependencies?\n\n5. It works for regular 'POST backs' to the server.\n\n    If you are doing a regular post or just gathering the form data you don't need to do anything extra to provide a name and value for the selected option.\n\n6. Mine just looks nicer\n\n    A lot nicer!\n\n7. It's simple!!\n\n## Available Props\n\n```javascript\nprops: {\n    // This corresponds to v-model\n    value: {\n        required: true\n    },\n    taggable: {\n        type: Boolean,\n        required: false,\n        default: () =\u003e false\n    },\n    // Use classes to override the look and feel\n    // Provide these EIGHT classes.\n    classes: {\n        type: Object,\n        required: false,\n        default: () =\u003e {\n            return {\n                icons: 'icons',\n                active: 'active',\n                wrapper: \"multi-select-wrapper\",\n                searchWrapper: \"search-wrapper\",\n                searchInput: \"search-input\",\n                pill: \"pill\",\n                required: \"required\",\n                dropdown: \"dropdown\"\n            };\n        }\n    },\n    // Give your input a name\n    // Good for posting forms\n    name: {\n        type: String,\n        required: false,\n        default: () =\u003e \"\"\n    },\n    // Your list of things for the select   \n    options: {\n        type: Array,\n        required: false,\n        default: () =\u003e []\n    },\n    // Tells vue-taggable-select what key to use\n    // for generating option labels\n    optionLabel: {\n        type: String,\n        required: false,\n        default: () =\u003e null\n    },\n    // Tells vue-taggable-select the value\n    // you want populated in the select for the \n    // input\n    optionKey: {\n        type: String,\n        required: false,\n        default: () =\u003e null\n    },\n    // Give your input an html element id\n    placeholder: {\n        type: String,\n        required: false,\n        default: () =\u003e \"Search Here\"\n    },\n    maxHeight: {\n        type: String,\n        default: () =\u003e \"220px\",\n        required: false\n    },\n    //Give the input an id\n    inputId: {\n        type: String,\n        default: () =\u003e \"multi-select\",\n        required: false\n    },\n    // Seed search text with initial value\n    initial: {\n        type: String,\n        required: false,\n        default: () =\u003e null\n    },\n    // Make it required\n    required: {\n        type: Boolean,\n        required: false,\n        default: () =\u003e false\n    },\n    // Max number of results to show.\n    maxResults: {\n        type: Number,\n        required: false,\n        default: () =\u003e 30\n    },\n    //Meh\n    tabindex: {\n        type: String,\n        required: false,\n        default: () =\u003e {\n            return \"\";\n        }\n    },\n    // Remove previously selected options\n    // via the delete key\n    keyboardDelete: {\n        type: Boolean,\n        required: false,\n        default: () =\u003e {\n            return true;\n        }\n    },\n    // Tell vue-taggable-select how to display\n    // selected options\n    getOptionDescription: {\n        type: Function,\n        default(option) {\n            if (this.optionKey \u0026\u0026 this.optionLabel) {\n                return option[this.optionKey] + \" \" + option[this.optionLabel];\n            }\n            if (this.optionLabel) {\n                return option[this.optionLabel];\n            }\n            if (this.optionKey) {\n                return option[this.optionKey];\n            }\n            return option;\n        }\n    },\n    // Use this to tell vue-taggable-select\n    // the values are for doing a submit\n    getOptionValue: {\n        type: Function,\n        default(option) {\n            if (this.optionKey) {\n                return option[this.optionKey];\n            }\n\n            if (this.optionLabel) {\n                return option[this.optionLabel];\n            }\n\n            return option;\n        }\n    }\n},\n```\t \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobrogers3%2Fvue-taggable-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobrogers3%2Fvue-taggable-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobrogers3%2Fvue-taggable-select/lists"}