{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sparkles",
  "title": "Sparkles",
  "author": "VenusUI",
  "description": "Small stars that twinkle around a word, badge or button.",
  "files": [
    {
      "path": "registry/default/ui/sparkles.tsx",
      "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\ninterface SparklesProps extends React.ComponentProps<\"span\"> {\n  /** Number of sparkles. */\n  count?: number\n  /** Sparkle color. Any CSS color. Defaults to the text color. */\n  color?: string\n}\n\n// Deterministic pseudo-random values: server and client render identical HTML.\nfunction seeded(index: number, salt: number) {\n  const x = Math.sin(index * 12.9898 + salt * 78.233) * 43758.5453\n  return x - Math.floor(x)\n}\n\n/**\n * Small four-point stars that twinkle around their content, e.g. a word in a\n * headline or a badge. Decorative; hidden when the user prefers reduced motion.\n */\nfunction Sparkles({ count = 10, color, className, children, ...props }: SparklesProps) {\n  return (\n    <span data-slot=\"sparkles\" className={cn(\"relative inline-block\", className)} {...props}>\n      <span aria-hidden=\"true\" className=\"pointer-events-none absolute -inset-3 motion-reduce:hidden\">\n        {Array.from({ length: count }, (_, i) => {\n          const size = 6 + Math.round(seeded(i, 1) * 8)\n          return (\n            <svg\n              key={i}\n              viewBox=\"0 0 16 16\"\n              className=\"absolute animate-sparkle\"\n              style={{\n                top: `${Math.round(seeded(i, 2) * 100)}%`,\n                left: `${Math.round(seeded(i, 3) * 100)}%`,\n                width: size,\n                height: size,\n                color: color ?? \"currentColor\",\n                animationDelay: `${(seeded(i, 4) * 2).toFixed(2)}s`,\n                animationDuration: `${(1.4 + seeded(i, 5) * 1.4).toFixed(2)}s`,\n              }}\n            >\n              <path d=\"M8 0c.5 4.2 3.3 7 8 8-4.7 1-7.5 3.8-8 8-.5-4.2-3.3-7-8-8 4.7-1 7.5-3.8 8-8Z\" fill=\"currentColor\" />\n            </svg>\n          )\n        })}\n      </span>\n      <span className=\"relative\">{children}</span>\n    </span>\n  )\n}\n\nexport { Sparkles, type SparklesProps }\n",
      "type": "registry:ui"
    }
  ],
  "cssVars": {
    "theme": {
      "animate-sparkle": "sparkle 1.8s ease-in-out infinite"
    }
  },
  "css": {
    "@keyframes sparkle": {
      "0%, 100%": {
        "transform": "scale(0) rotate(0deg)",
        "opacity": "0"
      },
      "50%": {
        "transform": "scale(1) rotate(90deg)",
        "opacity": "1"
      }
    }
  },
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "effects",
    "text",
    "animations"
  ],
  "type": "registry:ui"
}