{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "wave-text",
  "type": "registry:component",
  "title": "Wave Text",
  "description": "Letters bob up and down in a rolling wave, each one a beat behind the last.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "text",
    "wave",
    "bounce",
    "loop",
    "playful",
    "text"
  ],
  "docs": "https://hyperblur.dev/effects/wave-text",
  "files": [
    {
      "path": "registry/hyperblur/wave-text.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/wave-text.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface WaveTextProps extends React.HTMLAttributes<HTMLSpanElement> {\n  text: string;\n  amplitude?: number;\n  speed?: number;\n  stagger?: number;\n}\n\nconst css = `\n@keyframes hb-wave {\n  0%, 100% { transform: translateY(0); }\n  25% { transform: translateY(calc(var(--hb-amp) * -1)); }\n  75% { transform: translateY(var(--hb-amp)); }\n}\n.hb-wave { display: inline-block; white-space: nowrap; }\n.hb-wave > span[aria-hidden] {\n  display: inline-block;\n  white-space: pre;\n  animation: hb-wave calc(1.6s / var(--hb-s)) ease-in-out infinite;\n  animation-delay: calc(var(--hb-n) * var(--hb-st));\n}\n@media (prefers-reduced-motion: reduce) { .hb-wave > span[aria-hidden] { animation: none !important; } }\n`;\n\nexport function WaveText({\n  text,\n  amplitude = 8,\n  speed = 1,\n  stagger = 0.06,\n  className = \"\",\n  style,\n  ...rest\n}: WaveTextProps) {\n  const vars = {\n    \"--hb-amp\": `${amplitude}px`,\n    \"--hb-s\": speed,\n    \"--hb-st\": `${stagger}s`,\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <span className={`hb-wave ${className}`} style={vars} aria-label={text} {...rest}>\n      <style href=\"hb-wave-text\" precedence=\"default\">{css}</style>\n      {Array.from(text).map((ch, i) => (\n        <span\n          key={i}\n          aria-hidden=\"true\"\n          style={{ \"--hb-n\": i } as React.CSSProperties}\n        >\n          {ch === \" \" ? \" \" : ch}\n        </span>\n      ))}\n    </span>\n  );\n}\n"
    }
  ]
}