{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "tag", "title": "Tag", "description": "Removable label element for displaying categories, filters, or selections.", "dependencies": [ "@base-ui/react", "class-variance-authority", "lucide-react" ], "files": [ { "path": "packages/ui/src/tag.tsx", "content": "\"use client\";\n\nimport { Toggle as TogglePrimitive } from \"@base-ui/react/toggle\";\nimport { cva } from \"class-variance-authority\";\nimport { X as XIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"./utils\";\n\n// ---------------------------------------------------------------------------\n// Variants\n// ---------------------------------------------------------------------------\n\nconst tagVariants = cva(\n \"inline-flex h-6 shrink-0 cursor-pointer touch-manipulation select-none items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full bg-secondary px-2.5 font-medium text-secondary-foreground text-xs transition-colors hover:bg-secondary-hover focus-visible:outline-2 focus-visible:outline-ring/50 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 has-[[data-slot=avatar]]:pl-1 aria-pressed:bg-primary/10 aria-pressed:text-primary dark:aria-pressed:bg-primary/15 [&_svg:not([class*='size-'])]:size-3 [&_svg]:pointer-events-none [&_svg]:shrink-0\"\n);\n\n// ---------------------------------------------------------------------------\n// Tag\n// ---------------------------------------------------------------------------\n\nexport interface TagProps extends TogglePrimitive.Props {}\n\nfunction Tag({ className, ...props }: TagProps) {\n return (\n \n );\n}\n\n// ---------------------------------------------------------------------------\n// TagRemove\n// ---------------------------------------------------------------------------\n\nexport interface TagRemoveProps extends React.ComponentPropsWithRef<\"button\"> {}\n\nfunction TagRemove({\n className,\n children,\n \"aria-label\": ariaLabel,\n ...props\n}: TagRemoveProps) {\n const hasCustomChildren = !!children;\n return (\n \n {children || }\n \n );\n}\n\n// ---------------------------------------------------------------------------\n// Exports\n// ---------------------------------------------------------------------------\n\nexport { Tag, TagRemove, tagVariants };\n", "type": "registry:ui" } ], "type": "registry:ui" }