{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"badge","type":"registry:ui","title":"Animated Badge","description":"Small uppercase status label in nine tones, with an optional pulsing dot for live states and a lock glyph on Pro.","author":"GetUrUI <hello@geturui.dev>","dependencies":["lucide-react"],"registryDependencies":[],"files":[{"path":"registry/geturui/ui/badge.tsx","type":"registry:ui","target":"components/ui/badge.tsx","content":"import * as React from \"react\";\nimport { Lock } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nconst tones = {\n  neutral: \"bg-surface text-ink-muted border-border\",\n  new: \"bg-volt-soft text-volt-ink border-transparent\",\n  free: \"bg-transparent text-volt-ink border-volt-ink\",\n  pro: \"bg-ember-soft text-ember-ink border-transparent\",\n  updated: \"bg-transparent text-info border-info\",\n  beta: \"bg-transparent text-warning border-warning\",\n  count: \"bg-surface text-ink-subtle border-border font-mono normal-case tracking-normal px-1.5 text-[11px] font-medium\",\n  success: \"bg-transparent text-success border-success\",\n  danger: \"bg-transparent text-danger border-danger\",\n} as const;\n\nexport type BadgeTone = keyof typeof tones;\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {\n  tone?: BadgeTone;\n  /** Animated dot before the label — announcement bar only. */\n  pulse?: boolean;\n  icon?: React.ReactNode;\n}\n\n/** Small uppercase status label. `pro` adds a lock glyph automatically. */\nexport function Badge({ tone = \"neutral\", pulse, icon, className, children, ...props }: BadgeProps) {\n  return (\n    <span\n      className={cn(\n        \"inline-flex h-5 shrink-0 items-center gap-1 whitespace-nowrap rounded-full border px-2 text-[10.5px] font-semibold uppercase leading-none tracking-[0.5px]\",\n        tones[tone],\n        className,\n      )}\n      {...props}\n    >\n      {pulse && <span aria-hidden className=\"size-1.5 rounded-full bg-current animate-pulse-dot\" />}\n      {icon ?? (tone === \"pro\" ? <Lock aria-hidden className=\"size-[11px]\" strokeWidth={2.25} /> : null)}\n      {children}\n    </span>\n  );\n}\n"},{"path":"LICENSE-geturui.md","type":"registry:file","target":"LICENSE-geturui.md","content":"MIT License\n\nCopyright (c) 2026 geturui.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"}],"categories":["components","badge","label","status","tag","pill","pulse"],"meta":{"tier":"free","license":"MIT","docs":"https://geturui.com/docs/badge"}}