{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "shiny-text",
  "type": "registry:component",
  "title": "Shiny Text",
  "description": "Text with a band of light that glides across the glyphs on a loop, like a reflection passing over brushed metal.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "text",
    "text",
    "shine",
    "shimmer",
    "gradient",
    "headline",
    "loop"
  ],
  "docs": "https://hyperblur.dev/effects/shiny-text",
  "files": [
    {
      "path": "registry/hyperblur/shiny-text.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/shiny-text.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ShinyTextProps extends React.HTMLAttributes<HTMLSpanElement> {\n  text: string;\n  speed?: number;\n  color?: string;\n  shine?: string;\n  pauseOnHover?: boolean;\n  disabled?: boolean;\n  direction?: \"right\" | \"left\";\n}\n\nconst css = `\n@keyframes hb-shn-sweep {\n  0% { background-position: 100% 0; }\n  70%, 100% { background-position: 0% 0; }\n}\n.hb-shn {\n  display: inline-block;\n  white-space: pre-wrap;\n  color: var(--hb-shn-c);\n  background-image: linear-gradient(110deg, var(--hb-shn-c) 0%, var(--hb-shn-c) 38%, var(--hb-shn-s) 50%, var(--hb-shn-c) 62%, var(--hb-shn-c) 100%);\n  background-size: 250% 100%;\n  background-repeat: no-repeat;\n  background-position: 100% 0;\n  -webkit-background-clip: text;\n  background-clip: text;\n  -webkit-text-fill-color: transparent;\n  animation: hb-shn-sweep var(--hb-shn-d) cubic-bezier(.45, .05, .35, 1) infinite;\n}\n.hb-shn[data-dir=\"left\"] { animation-direction: reverse; }\n.hb-shn[data-pause]:hover { animation-play-state: paused; }\n.hb-shn[data-off] {\n  animation: none;\n  background-image: none;\n  -webkit-text-fill-color: currentColor;\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-shn { animation: none; background-position: 50% 0; }\n}\n`;\n\nexport function ShinyText({\n  text,\n  speed = 3,\n  color = \"#8f8f8f\",\n  shine = \"#ffffff\",\n  pauseOnHover = false,\n  disabled = false,\n  direction = \"right\",\n  className = \"\",\n  style,\n  ...rest\n}: ShinyTextProps) {\n  const vars = {\n    \"--hb-shn-c\": color,\n    \"--hb-shn-s\": shine,\n    \"--hb-shn-d\": `${(Math.max(0.4, speed) / 0.7).toFixed(3)}s`,\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <span\n      className={`hb-shn ${className}`}\n      style={vars}\n      data-dir={direction}\n      data-pause={pauseOnHover ? \"\" : undefined}\n      data-off={disabled ? \"\" : undefined}\n      {...rest}\n    >\n      <style href=\"hb-shiny-text\" precedence=\"default\">{css}</style>\n      {text}\n    </span>\n  );\n}\n"
    }
  ]
}