Forms
Navigation & layout
Data display & feedback
Date & time
Browse components
← All components
Tag
Selectable or dismissible tag. Use inside TagGroup for selection.
Install
npx shadcn@latest add https://ui.anuragroy.dev/r/tag.jsonPreview
Loading preview…
Installation
Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.
Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/tag.jsonGitHub fallback if the website is down:
Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/tag.jsonUsage
Import paths follow your components.json aliases. After install, the default path is @/components/ui/tag.
Import
import { Tag } from "@/components/ui/tag"example.tsx
import { Tag } from "@/components/ui/tag"import { TagGroup } from "@/components/ui/tag-group"export function Example() { return ( <TagGroup label="Topics" selectionMode="multiple" defaultValue={["react"]}> <Tag value="react" removable>React</Tag> <Tag value="vue" removable>Vue</Tag> </TagGroup> )}API Reference
Tag
| Prop | Type | Default |
|---|---|---|
| value | string | — |
| variant | "primary" | "outline" | "soft" | "primary" |
| removable | boolean | — |
| removeLabel | string | "Remove" |
| disabled | boolean | — |
- value — Required selection key.