Join our Discord Community
Media

Tags

Interactive tag selection component for React and Next.js applications. Built with TypeScript support, Tailwind CSS styling, and shadcn/ui design featuring search filtering, keyboard navigation, and controlled state management.

Loading component...

Installation

npx shadcn@latest add https://www.shadcn.io/registry/tags.json
npx shadcn@latest add https://www.shadcn.io/registry/tags.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/tags.json
bunx shadcn@latest add https://www.shadcn.io/registry/tags.json

Features

  • Search filtering - Built-in input field for tag discovery using JavaScript text matching
  • Controlled/uncontrolled - Flexible state management options for React applications
  • Keyboard navigation - Full Command component integration with arrow key support using TypeScript handlers
  • Responsive width - Auto-adjusting container sizing based on parent element for Next.js projects
  • Removable tags - Optional dismiss buttons for selected items using event callbacks
  • Context management - Shared state through TagsContext for component communication using React Context
  • Customizable styling - Complete appearance control with className props using Tailwind CSS
  • Open source - Free tag component with shadcn/ui theming and accessibility support

Examples

Create a tag

Loading component...

Filter available tags

Loading component...

Use Cases

  • Content tagging - Blog posts, articles, and media categorization systems
  • User profiles - Skill tags, interests, and preference selection interfaces
  • Product filters - E-commerce category and attribute filtering
  • Project organization - Task labeling and team collaboration tools

Implementation

Built with Command component for search and navigation. Uses TagsContext for state sharing. Supports tag creation and removal. Keyboard accessible with full ARIA support.