{"id":17321423,"url":"https://github.com/tompave/tagbox","last_synced_at":"2025-03-27T03:16:59.879Z","repository":{"id":10447002,"uuid":"12615186","full_name":"tompave/tagbox","owner":"tompave","description":"A simple jQuery plugin to painlessly create input boxes for tag lists like the ones used on StackOverflow or Linkedin.","archived":false,"fork":false,"pushed_at":"2015-07-26T02:52:04.000Z","size":392,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T08:41:46.282Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://tompave.github.io/tagbox/","language":"CSS","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/tompave.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-05T10:29:24.000Z","updated_at":"2017-11-23T03:51:33.000Z","dependencies_parsed_at":"2022-08-29T14:30:05.591Z","dependency_job_id":null,"html_url":"https://github.com/tompave/tagbox","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tompave%2Ftagbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tompave%2Ftagbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tompave%2Ftagbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tompave%2Ftagbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tompave","download_url":"https://codeload.github.com/tompave/tagbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245773173,"owners_count":20669719,"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":[],"created_at":"2024-10-15T13:37:27.808Z","updated_at":"2025-03-27T03:16:59.857Z","avatar_url":"https://github.com/tompave.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"#tagbox\n\nA simple jQuery plugin to painlessly create input boxes for tag lists like the ones used on StackOverflow or Linkedin.  \n__jQueryUI is NOT required!__  \n\n![example screenshot](https://raw.github.com/tompave/tagbox/master/pics/screenshot.png)\n\n##Demo\nA demo with live HTML preview is available [here](http://tommaso.pavese.me/tagbox/example.html).\n\n##How To\n\n###What you'll need\n\nJust import jQuery (either `1.10` or `2.0`), the plugin javascript file and the related stylesheet (a default CSS file is inlcuded).   \n\n```html\n\u003chead\u003e\n  \u003clink rel=\"stylesheet\" type=\"text/css\" href=\"style/layout.css\"\u003e \u003c!-- your general CSS --\u003e\n  \u003clink rel=\"stylesheet\" type=\"text/css\" href=\"style/tag_box.css\"\u003e \u003c!-- tagbox related CSS --\u003e\n\n  \u003cscript type=\"text/javascript\" src=\"scripts/jquery-2.0.3.min.js\"\u003e\u003c/script\u003e\n  \u003cscript type=\"text/javascript\" src=\"scripts/tagbox.min.js\"\u003e\u003c/script\u003e \u003c!-- the plugin --\u003e\n  \u003cscript type=\"text/javascript\" src=\"scripts/logic.js\"\u003e\u003c/script\u003e \u003c!-- your custom script --\u003e\n\u003c/head\u003e\n```\n\n(of course, you can package and minify everything in a single file)\n\n\n\nTo use the plugin, you'll need a `\u003cform\u003e` containing the `\u003cdiv\u003e` you plan to use as the tag input.\n\n```html\n\u003cform id=\"the_parent_form\" accept-charset=\"UTF-8\" action=\"/form_action\" method=\"post\"\u003e\n  \u003c!-- other inputs and elements... --\u003e\n  \u003cdiv id=\"tag_box\"\u003e\u003c/div\u003e\n  \u003c!-- other inputs and elements... --\u003e\n\u003c/form\u003e\n```\n\n###Trigger the plugin\n\nOnce you have setup your `\u003cform\u003e` and your `\u003cdiv\u003e`, you can just call:\n\n```javascript\n$(\"#tag_box\").tagbox();\n```\n\nThe result will be:\n\n```html\n\u003cform id=\"the_parent_form\" accept-charset=\"UTF-8\" action=\"/form_action\" method=\"post\"\u003e\n  \u003c!-- other inputs and elements... --\u003e\n  \u003cdiv id=\"tag_box\"\u003e\n    \u003cdiv class=\"tag_element\"\u003e\n      \u003cspan class=\"tag_label\"\u003eexample\u003c/span\u003e\n      \u003ca href=\"#\" title=\"remove\" class=\"tag_dismiss\"\u003e\u0026times;\u003c/a\u003e\n    \u003c/div\u003e\n      \n    \u003cinput name=\"type_target\" id=\"type_target\" type=\"text\" maxlength=\"40\"\u003e\n  \u003c/div\u003e\n  \u003c!-- other inputs and elements... --\u003e\n\u003c/form\u003e\n```\n\n\n\n###Options\n\nYou can pass the function an optional object with some configuration values. Here are the defaults:\n\n```javascript\n$(\"#tag_box\").tagbox({\n  typeTargetNameAndId : \"type_target\",\n  tagInputsArrayName : \"tag_list\",\n  includeExampleTag : true\n});\n```\n\n\n###Style\n\nThe plugin comes with a default stylesheet for the tag widget (SCSS).  \nOf course you can use your own.\n\n\n##How it works\n\nThe plugin listens for keypress events and reacts on `enter`, `,`, `space` or `tab`.  \nWhen one of these keys is pressed, it creates a new graphical _tag\\_element_ in the tag box, and inserts in the form a new hidden input for the new inserted value. The hidden inputs have a collective name (can be configured) and will be received by the server as an array of values.  \nRemoving a graphical _tag\\_element_ also removes the corresponding hidden input.  \n\n\n##Contribute\n\nWith this plugin I wanted to keep things simple, but I'd like to hear suggestions about features and configuration options.  \nIf you want you can send me a pull request:\n\n* fork on GitHub\n* `git clone` your fork on your computer\n* `git checkout -b your_new_feature_branch`\n* implement your modifications\n* `git add .` and `git commit`\n* `git push`\n* create a pull request on GitHub\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftompave%2Ftagbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftompave%2Ftagbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftompave%2Ftagbox/lists"}