{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"shiny-text","type":"registry:ui","title":"Shiny Text","description":"Text with a soft band of light that sweeps across it on a loop.","dependencies":["motion"],"registryDependencies":["https://ui.mekaigames.com/r/theme.json"],"files":[{"path":"components/ui/shiny-text.tsx","type":"registry:ui","content":"\"use client\";\n\nimport { motion, useReducedMotion } from \"motion/react\";\n\ntype ShinyTextProps = {\n  text: string;\n  /** Seconds for one sweep of light across the text. */\n  speed?: number;\n  shineColor?: string;\n  baseColor?: string;\n  className?: string;\n};\n\n/** Text with a soft band of light that sweeps across it on a loop. */\nexport function ShinyText({\n  text,\n  speed = 2.4,\n  shineColor = \"#f4ede3\",\n  baseColor = \"#857c71\",\n  className = \"\",\n}: ShinyTextProps) {\n  const reduce = useReducedMotion();\n\n  if (reduce) {\n    return (\n      <span className={className} style={{ color: baseColor }}>\n        {text}\n      </span>\n    );\n  }\n\n  return (\n    <motion.span\n      className={`inline-block bg-clip-text ${className}`}\n      style={{\n        color: \"transparent\",\n        WebkitBackgroundClip: \"text\",\n        backgroundImage: `linear-gradient(110deg, ${baseColor} 0%, ${baseColor} 42%, ${shineColor} 50%, ${baseColor} 58%, ${baseColor} 100%)`,\n        backgroundSize: \"300% 100%\",\n      }}\n      // The gradient is three times wider than the text; sliding it from the right edge to the left one\n      // carries the bright band across from left to right.\n      initial={{ backgroundPosition: \"100% 50%\" }}\n      animate={{ backgroundPosition: \"0% 50%\" }}\n      transition={{ duration: Math.max(0.3, speed), ease: \"linear\", repeat: Infinity, repeatDelay: speed * 0.4 }}\n    >\n      {text}\n    </motion.span>\n  );\n}\n"}]}