Forms
Navigation & layout
Data display & feedback
Date & time
Browse components
← All components
Tag Group
Group of tags with single or multiple selection and remove.
Install
npx shadcn@latest add https://ui.anuragroy.dev/r/tag-group.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-group.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-group.jsonUsage
Import paths follow your components.json aliases. After install, the default path is @/components/ui/tag-group.
Import
import { TagGroup } from "@/components/ui/tag-group"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"]} onRemove={() => undefined} > <Tag value="react" removable>React</Tag> <Tag value="vue" removable>Vue</Tag> </TagGroup> )}API Reference
TagGroup
| Prop | Type | Default |
|---|---|---|
| label | React.ReactNode | — |
| selectionMode | "none" | "single" | "multiple" | — |
| value | string[] | — |
| defaultValue | string[] | — |
| onValueChange | (value: string[]) => void | — |
| onRemove | (value: string) => void | — |
| disabled | boolean | — |