{"id":16730987,"url":"https://github.com/ndyag/react-tageditor","last_synced_at":"2025-03-17T01:31:41.359Z","repository":{"id":33176290,"uuid":"36817450","full_name":"NdYAG/react-tageditor","owner":"NdYAG","description":"A StackOverflow style tag editor","archived":false,"fork":false,"pushed_at":"2022-12-03T15:36:45.000Z","size":550,"stargazers_count":28,"open_issues_count":14,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-27T16:20:40.327Z","etag":null,"topics":["react","tageditor"],"latest_commit_sha":null,"homepage":"http://ndyag.github.io/react-tageditor/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NdYAG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-03T16:52:35.000Z","updated_at":"2024-06-04T09:35:58.000Z","dependencies_parsed_at":"2022-06-27T09:15:12.564Z","dependency_job_id":null,"html_url":"https://github.com/NdYAG/react-tageditor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NdYAG%2Freact-tageditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NdYAG%2Freact-tageditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NdYAG%2Freact-tageditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NdYAG%2Freact-tageditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NdYAG","download_url":"https://codeload.github.com/NdYAG/react-tageditor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243836015,"owners_count":20355615,"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":["react","tageditor"],"created_at":"2024-10-12T23:35:25.700Z","updated_at":"2025-03-17T01:31:40.996Z","avatar_url":"https://github.com/NdYAG.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React-TagEditor\n\nA tag editor coded in ES6, with React.js as its dependency. Inspired by StackOverflow's tag editor.\n\n**Features**\n\n* Basic editing/removing\n* Navigating through tags via `left/right` on keyboard\n* Tag can be modified after being created\n* Tag can be split at the cursor point.\n\n## Demo\n\n![](http://daix.me/react-tageditor/record.gif)\n\n* [basic](http://NdYAG.github.io/react-tageditor/)\n* [validation and error handler](http://NdYAG.github.io/react-tageditor/validation.html)\n\n## Install\n\nbower:\n\n```sh\nbower install react-tageditor --save\n```\n\n```html\n\u003clink rel=\"stylesheet\" href=\"./bower_components/react-tageditor/dist/style/default.css\"\u003e\n\n\u003cscript src=\"./bower_components/react/react.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"./bower_components/react-tageditor/dist/index.js\"\u003e\u003c/script\u003e\n```\n\nnpm:\n\n```sh\nnpm install react-tageditor --save\n```\n\n## API\n\n### Attributes\n\n```html\n\u003cTagEditor tags={[]} delimiters={[]} placeholder=\"\" /\u003e\n```\n\nAll attributes are optional.\n\n* `tags`: An array of tags.\n* `delimiters`: An array of delimiters for splitting tags. Element in array could be string or number(keyCode).\n* `placeholder`\n* `validation(currentTag, allTags)`: A function for validating. Throw an error when tag/tags do not meet your requirement. Error will be passed to `onError`.\n* `onChange(tagsChanged, allTags, action)`: Callback triggered after tags added or removed.`action` will be `add` or `remove`.\n* `onError(error)`: Callback triggered on error. Access more information about the error via `error.name` \u0026 `error.message`.\n\n### Methods\n\n* `add(tagText)`\n* `remove(tagText)`\n* `output()`: returns an array of tag text\n\n## Styling\n\n```scss\n$tagColor: #aaa !default;\n$tagColorActive: #555 !default;\n$tagBgColor: #ebebeb !default;\n$tagFontSize: 1rem !default;\n\n$editorBorder: #ccc !default;\n$editorBorderActive: #808080 !default;\n\n$placeholderColor: #777 !default;\n\n$pink: #f2c9c9 !default;\n$crimson: #5c0909 !default;\n```\n\n## Development\n\n1. `gem install sass`\n\n2. `npm install` \u003cbr/\u003eThis will install `react`, `webpack`, `babel-loader` and other dependencies.\n\n3. `bower install` \u003cbr/\u003eThis will install `react`, `neutron` for building examples.\n\n4. `npm run build` \u003cbr/\u003eCompile our `js/scss` files to `dist/`\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndyag%2Freact-tageditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndyag%2Freact-tageditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndyag%2Freact-tageditor/lists"}