{"id":24147977,"url":"https://github.com/vpgits/shadcn-tag-input","last_synced_at":"2026-04-22T10:03:16.494Z","repository":{"id":271971333,"uuid":"915142919","full_name":"vpgits/shadcn-tag-input","owner":"vpgits","description":"A customizable and accessible tag input component built for shadcn/ui. This component allows users to select multiple tags from an intuitive searchable dropdown, with keyboard navigation support and a clean, modern design.","archived":false,"fork":false,"pushed_at":"2025-01-11T04:55:08.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T16:14:10.669Z","etag":null,"topics":["nextjs","shadcn-ui","tag-input","tags"],"latest_commit_sha":null,"homepage":"https://shadcn-tag-input-kappa.vercel.app","language":"TypeScript","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/vpgits.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":"2025-01-11T04:41:55.000Z","updated_at":"2025-01-11T04:55:12.000Z","dependencies_parsed_at":"2025-01-11T05:29:40.564Z","dependency_job_id":"7ae23ebe-b23d-47a8-a073-2038a6c8a29a","html_url":"https://github.com/vpgits/shadcn-tag-input","commit_stats":null,"previous_names":["vpgits/shadcn-tag-input"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vpgits/shadcn-tag-input","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpgits%2Fshadcn-tag-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpgits%2Fshadcn-tag-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpgits%2Fshadcn-tag-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpgits%2Fshadcn-tag-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vpgits","download_url":"https://codeload.github.com/vpgits/shadcn-tag-input/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpgits%2Fshadcn-tag-input/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32130776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T08:34:57.708Z","status":"ssl_error","status_checked_at":"2026-04-22T08:34:55.583Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["nextjs","shadcn-ui","tag-input","tags"],"created_at":"2025-01-12T07:17:10.052Z","updated_at":"2026-04-22T10:03:16.478Z","avatar_url":"https://github.com/vpgits.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shadcn Tag Input Component\n\nA customizable and accessible tag input component built for shadcn/ui. This component allows users to select multiple tags from an intuitive searchable dropdown, with keyboard navigation support and a clean, modern design.\n\n## Credits\n\nThis component was developed with inspiration from the following projects:\n\n- [Sonner by Emil Kowalski](https://github.com/emilkowalski/sonner)\n- [Victor Welander's Projects](https://github.com/victorwelander)\n\nAs always, thanks to [shadcn-ui](https://github.com/shadcn-ui) and [shadcn](https://github.com/shadcn).\n\n## Features\n\n- 🔍 Searchable tag selection\n- ⌨️ Full keyboard navigation support\n- 🎨 Follows your shadcn theme\n- 🧩 Fully customizable\n- ♿ Accessible\n- 📱 Mobile friendly\n- 🏷️ Pill-style tags with remove option\n- 🔄 Backspace support for tag removal\n- 🎨 Custom theming for displaying tags\n- ❌❌ Press the cross twice to clear all\n\n## Installation\n\n```bash\nnpx shadcn-ui@latest add https://shadcn-tag-input/registry/tag-input.json\n```\n\nThis will install the component and all required dependencies.\n\n## Prerequisites\n\nThis component requires:\n\n- A Next.js project with shadcn/ui configured\n- The following shadcn components installed:\n  - Command\n  - Badge\n\nWorks with Next-Js 15 with `--legacy-peer-deps` flag.\n\n## Usage\n\n```tsx\nimport { TagInput } from \"@/components/ui/tag-input\";\nimport { useState } from \"react\";\n\ntype Tag = {\n  label: string;\n  value: string;\n};\n\nexport default function Demo() {\n  const [tags, setTags] = useState\u003cTag[]\u003e([]);\n\n  const allTags = [\n    { label: \"React\", value: \"react\" },\n    { label: \"Next.js\", value: \"nextjs\" },\n    { label: \"TypeScript\", value: \"typescript\" },\n    { label: \"shadcn/ui\", value: \"shadcn\" },\n  ];\n\n  return (\n    \u003cTagInput\n      tags={tags}\n      setTags={setTags}\n      allTags={allTags}\n      placeholder=\"Add frameworks...\"\n    /\u003e\n  );\n}\n```\n\n## Props\n\n| Prop           | Type                                           | Description                          | Default   |\n| -------------- | ---------------------------------------------- | ------------------------------------ | --------- |\n| `tags`         | `Tag\u003cT\u003e[]`                                     | Currently selected tags              | Required  |\n| `setTags`      | `(tags: Tag\u003cT\u003e[]) =\u003e void`                     | Function to update tags              | Required  |\n| `allTags`      | `Tag\u003cT\u003e[]`                                     | Array of all available tags          | Required  |\n| `AllTagsLabel` | `({ value }: { value: T }) =\u003e React.ReactNode` | Custom render function for tag items | Optional  |\n| `placeholder`  | `string`                                       | Input placeholder text               | \"Add tag\" |\n| `className`    | `string`                                       | Additional CSS classes               | Optional  |\n\n## Advanced Usage\n\n### Custom Tag Rendering\n\nYou can customize how tags appear in the dropdown using the `AllTagsLabel` prop:\n\n```tsx\nfunction Demo() {\n  return (\n    \u003cTagInput\n      tags={tags}\n      setTags={setTags}\n      allTags={allTags}\n      AllTagsLabel={({ value }) =\u003e (\n        \u003cdiv className=\"flex items-center gap-2\"\u003e\n          \u003cIcon name={value} /\u003e\n          \u003cspan\u003e{value}\u003c/span\u003e\n        \u003c/div\u003e\n      )}\n    /\u003e\n  );\n}\n```\n\n### Controlled Input\n\nThe component is fully controlled, allowing you to manage the tag state in your application:\n\n```tsx\nfunction Demo() {\n  const [tags, setTags] = useState\u003cTag[]\u003e([]);\n\n  const handleTagsChange = (newTags: Tag[]) =\u003e {\n    // Add any validation or transformation logic here\n    setTags(newTags);\n  };\n\n  return \u003cTagInput tags={tags} setTags={handleTagsChange} allTags={allTags} /\u003e;\n}\n```\n\n## Theming\n\nThe component uses your existing shadcn theme and can be customized using Tailwind classes:\n\n```tsx\n\u003cTagInput\n  className=\"max-w-md\"\n  // Add any Tailwind classes for customization\n/\u003e\n```\n\n## Development\n\nTo modify the component:\n\n1. Clone the repository\n2. Install dependencies: `npm install`\n3. Make your changes\n4. Build the registry: `npm run build-registry`\n5. Test your changes locally\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT License - feel free to use this component in your projects. Or just copy and paste from here. Use this as you please.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvpgits%2Fshadcn-tag-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvpgits%2Fshadcn-tag-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvpgits%2Fshadcn-tag-input/lists"}