Skip to content

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.json

Preview

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.json

GitHub 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.json

Usage

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

PropTypeDefault
labelReact.ReactNode—
selectionMode"none" | "single" | "multiple"—
valuestring[]—
defaultValuestring[]—
onValueChange(value: string[]) => void—
onRemove(value: string) => void—
disabledboolean—