{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button-wave-letters",
  "type": "registry:component",
  "title": "Button Wave Letters",
  "description": "While hovered, a wave rolls through the label letter by letter, lifting each glyph and tinting it at the crest. A hand-drawn squiggle draws itself underneath and keeps flowing.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "buttons",
    "button",
    "letters",
    "wave",
    "stagger",
    "squiggle",
    "text"
  ],
  "docs": "https://hyperblur.dev/effects/button-wave-letters",
  "files": [
    {
      "path": "registry/hyperblur/button-wave-letters.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/button-wave-letters.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ButtonWaveLettersProps\n  extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"color\" | \"children\"> {\n  label?: string;\n  accent?: string;\n  stagger?: number;\n  size?: \"sm\" | \"md\" | \"lg\";\n}\n\nconst css = `\n.hb-xa7 {\n  --hb-xa7-c: #5eead4;\n  --hb-xa7-st: 45ms;\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  gap: 0.7em;\n  box-sizing: border-box;\n  margin: 0;\n  padding: 0.95em 1.5em 1.05em;\n  font: inherit;\n  font-size: 15px;\n  font-weight: 600;\n  line-height: 1;\n  color: #ededed;\n  background: #0f1312;\n  border: 0;\n  border-radius: 999px;\n  box-shadow: inset 0 0 0 1px #24302d, inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 26px -16px rgba(0, 0, 0, 0.9);\n  cursor: pointer;\n  user-select: none;\n  -webkit-tap-highlight-color: transparent;\n  transition: box-shadow 0.35s ease, background 0.35s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);\n}\n.hb-xa7 *, .hb-xa7 *::before, .hb-xa7 *::after { box-sizing: border-box; }\n.hb-xa7[data-size=\"sm\"] { font-size: 13px; }\n.hb-xa7[data-size=\"lg\"] { font-size: 17px; }\n.hb-xa7:hover:not(:disabled), .hb-xa7:focus-visible {\n  background: #0e1716;\n  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hb-xa7-c) 40%, #24302d), inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 30px -16px color-mix(in srgb, var(--hb-xa7-c) 45%, transparent);\n}\n.hb-xa7:active:not(:disabled) { transform: scale(0.97); }\n.hb-xa7:focus-visible { outline: 2px solid var(--hb-xa7-c); outline-offset: 3px; }\n.hb-xa7:disabled { opacity: 0.45; cursor: not-allowed; }\n.hb-xa7-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n.hb-xa7-word { position: relative; display: inline-flex; white-space: pre; }\n.hb-xa7-ch {\n  display: inline-block;\n  transition: color 0.3s ease;\n  animation-delay: calc(var(--hb-xa7-i) * var(--hb-xa7-st));\n}\n.hb-xa7:hover:not(:disabled) .hb-xa7-ch,\n.hb-xa7:focus-visible .hb-xa7-ch { animation: hb-xa7-wave 1.5s cubic-bezier(0.45, 0, 0.55, 1) infinite; animation-delay: calc(var(--hb-xa7-i) * var(--hb-xa7-st)); }\n.hb-xa7-line {\n  position: absolute;\n  left: 0;\n  right: 0;\n  bottom: -0.55em;\n  height: 0.45em;\n  overflow: hidden;\n  color: var(--hb-xa7-c);\n}\n.hb-xa7-line svg {\n  display: block;\n  width: 200%;\n  height: 100%;\n  transform: translateX(0);\n}\n.hb-xa7-line path {\n  stroke-dasharray: 1;\n  stroke-dashoffset: 1;\n  transition: stroke-dashoffset 0.6s cubic-bezier(0.7, 0, 0.2, 1);\n}\n.hb-xa7:hover:not(:disabled) .hb-xa7-line path,\n.hb-xa7:focus-visible .hb-xa7-line path { stroke-dashoffset: 0; }\n.hb-xa7:hover:not(:disabled) .hb-xa7-line svg,\n.hb-xa7:focus-visible .hb-xa7-line svg { animation: hb-xa7-slide 1.2s linear infinite; }\n.hb-xa7-dot {\n  width: 0.5em;\n  height: 0.5em;\n  flex: none;\n  border-radius: 50%;\n  background: var(--hb-xa7-c);\n  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hb-xa7-c) 20%, transparent), 0 0 10px var(--hb-xa7-c);\n  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n.hb-xa7:hover:not(:disabled) .hb-xa7-dot { transform: scale(1.25); }\n@keyframes hb-xa7-wave {\n  0%, 60%, 100% { transform: translateY(0) scale(1); color: #ededed; }\n  20% { transform: translateY(-0.32em) scale(1.08); color: var(--hb-xa7-c); }\n  40% { transform: translateY(0.06em) scale(0.98); color: #ededed; }\n}\n@keyframes hb-xa7-slide { to { transform: translateX(-50%); } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-xa7, .hb-xa7-ch, .hb-xa7-line path, .hb-xa7-dot { transition: none; }\n  .hb-xa7:hover:not(:disabled) .hb-xa7-ch, .hb-xa7:focus-visible .hb-xa7-ch,\n  .hb-xa7:hover:not(:disabled) .hb-xa7-line svg, .hb-xa7:focus-visible .hb-xa7-line svg { animation: none; }\n}\n`;\n\nexport function ButtonWaveLetters({\n  label = \"Start free trial\",\n  accent = \"#5eead4\",\n  stagger = 45,\n  size = \"md\",\n  type = \"button\",\n  className = \"\",\n  style,\n  ...rest\n}: ButtonWaveLettersProps) {\n  const chars = Array.from(label);\n  const vars = {\n    \"--hb-xa7-c\": accent,\n    \"--hb-xa7-st\": `${Math.max(0, stagger).toFixed(0)}ms`,\n    ...style,\n  } as React.CSSProperties;\n  const wave = \"M0 5 Q 5 1 10 5 T 20 5 T 30 5 T 40 5 T 50 5 T 60 5 T 70 5 T 80 5 T 90 5 T 100 5 T 110 5 T 120 5 T 130 5 T 140 5 T 150 5 T 160 5\";\n\n  return (\n    <>\n      <style href=\"hb-button-wave-letters\" precedence=\"default\">{css}</style>\n      <button type={type} className={`hb-xa7 ${className}`} style={vars} data-size={size} {...rest}>\n        <span className=\"hb-xa7-dot\" aria-hidden=\"true\" />\n        <span className=\"hb-xa7-sr\">{label}</span>\n        <span className=\"hb-xa7-word\" aria-hidden=\"true\">\n          {chars.map((ch, i) => (\n            <span className=\"hb-xa7-ch\" style={{ \"--hb-xa7-i\": i } as React.CSSProperties} key={i}>\n              {ch}\n            </span>\n          ))}\n          <span className=\"hb-xa7-line\">\n            <svg viewBox=\"0 0 160 10\" preserveAspectRatio=\"none\" fill=\"none\">\n              <path d={wave} stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" pathLength={1} vectorEffect=\"non-scaling-stroke\" />\n            </svg>\n          </span>\n        </span>\n      </button>\n    </>\n  );\n}\n"
    }
  ]
}