{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button-arrow-reveal",
  "type": "registry:component",
  "title": "Button Arrow Reveal",
  "description": "On hover the label slides left while an arrow slides in beside it. Clicking loops the arrow out the right edge and back in.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "buttons",
    "button",
    "arrow",
    "reveal",
    "slide",
    "cta",
    "hover"
  ],
  "docs": "https://hyperblur.dev/effects/button-arrow-reveal",
  "files": [
    {
      "path": "registry/hyperblur/button-arrow-reveal.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/button-arrow-reveal.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ButtonArrowRevealProps\n  extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"color\"> {\n  variant?: \"solid\" | \"outline\";\n  accent?: string;\n  size?: \"sm\" | \"md\" | \"lg\";\n  loading?: boolean;\n}\n\nconst css = `\n.hb-qa6 {\n  --hb-qa6-c: #2f7bff;\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  box-sizing: border-box;\n  margin: 0;\n  padding: 0.8em 1.9em;\n  font: inherit;\n  font-size: 15px;\n  font-weight: 600;\n  line-height: 1.2;\n  color: #ffffff;\n  background: var(--hb-qa6-c);\n  border: 0;\n  border-radius: 999px;\n  box-shadow: inset 0 0 0 1px transparent;\n  cursor: pointer;\n  overflow: hidden;\n  user-select: none;\n  -webkit-tap-highlight-color: transparent;\n  touch-action: manipulation;\n  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, background-color 0.25s ease;\n}\n.hb-qa6[data-size=\"sm\"] { font-size: 13px; }\n.hb-qa6[data-size=\"lg\"] { font-size: 17px; }\n.hb-qa6[data-variant=\"outline\"] {\n  color: #ededed;\n  background: transparent;\n  box-shadow: inset 0 0 0 1px #333333;\n}\n.hb-qa6[data-variant=\"outline\"]:hover:not(:disabled), .hb-qa6[data-variant=\"outline\"]:focus-visible:not(:disabled) {\n  box-shadow: inset 0 0 0 1px var(--hb-qa6-c);\n}\n.hb-qa6-in {\n  position: relative;\n  display: inline-block;\n  white-space: nowrap;\n  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);\n}\n.hb-qa6-ar {\n  position: absolute;\n  top: 50%;\n  left: 100%;\n  width: 1.1em;\n  height: 1.1em;\n  margin: -0.55em 0 0 0.55em;\n  fill: none;\n  stroke: currentColor;\n  stroke-width: 2;\n  stroke-linecap: round;\n  stroke-linejoin: round;\n  opacity: 0;\n  transform: translateX(-0.9em);\n  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;\n}\n.hb-qa6-sp {\n  position: absolute;\n  top: 50%;\n  left: 100%;\n  width: 1em;\n  height: 1em;\n  margin: -0.5em 0 0 0.6em;\n  border: 2px solid currentColor;\n  border-right-color: transparent;\n  border-radius: 50%;\n  animation: hb-qa6-spin 0.7s linear infinite;\n}\n.hb-qa6:hover:not(:disabled) .hb-qa6-in, .hb-qa6:focus-visible:not(:disabled) .hb-qa6-in { transform: translateX(-0.82em); }\n.hb-qa6:hover:not(:disabled) .hb-qa6-ar, .hb-qa6:focus-visible:not(:disabled) .hb-qa6-ar { opacity: 1; transform: translateX(0); }\n.hb-qa6[aria-busy=\"true\"] .hb-qa6-in { transform: translateX(-0.8em); }\n.hb-qa6:not(:hover):not(:focus-visible):not(:disabled) .hb-qa6-in { animation: hb-qa6-hint-in 4.6s cubic-bezier(0.22, 1, 0.36, 1) 1s infinite; }\n.hb-qa6:not(:hover):not(:focus-visible):not(:disabled) .hb-qa6-ar:not([data-go=\"true\"]) { animation: hb-qa6-hint-ar 4.6s cubic-bezier(0.22, 1, 0.36, 1) 1s infinite; }\n.hb-qa6-ar[data-go=\"true\"] { animation: hb-qa6-go 0.7s cubic-bezier(0.65, 0, 0.35, 1) !important; }\n.hb-qa6:active:not(:disabled) { transform: scale(0.97); }\n.hb-qa6:focus-visible { outline: 2px solid var(--hb-qa6-c); outline-offset: 3px; }\n.hb-qa6:disabled { cursor: not-allowed; }\n.hb-qa6:disabled:not([aria-busy=\"true\"]) { opacity: 0.45; }\n@keyframes hb-qa6-spin { to { transform: rotate(360deg); } }\n@keyframes hb-qa6-hint-in {\n  0%, 70% { transform: translateX(0); }\n  78%, 86% { transform: translateX(-0.82em); }\n  96%, 100% { transform: translateX(0); }\n}\n@keyframes hb-qa6-hint-ar {\n  0%, 70% { opacity: 0; transform: translateX(-0.9em); }\n  78%, 86% { opacity: 1; transform: translateX(0); }\n  96%, 100% { opacity: 0; transform: translateX(-0.9em); }\n}\n@keyframes hb-qa6-go {\n  0% { opacity: 1; transform: translateX(0); }\n  45% { opacity: 0; transform: translateX(1.6em); }\n  46% { opacity: 0; transform: translateX(-1.6em); }\n  100% { opacity: 1; transform: translateX(0); }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-qa6, .hb-qa6-in, .hb-qa6-ar { transition-duration: 0.01s; }\n  .hb-qa6 .hb-qa6-in, .hb-qa6 .hb-qa6-ar { animation: none !important; }\n  .hb-qa6:active:not(:disabled) { transform: none; }\n  .hb-qa6-sp { animation-duration: 1.6s; }\n}\n`;\n\nexport function ButtonArrowReveal({\n  children = \"Read the story\",\n  variant = \"solid\",\n  accent = \"#2f7bff\",\n  size = \"md\",\n  loading = false,\n  disabled = false,\n  type = \"button\",\n  className = \"\",\n  style,\n  onClick,\n  ...rest\n}: ButtonArrowRevealProps) {\n  const [run, setRun] = React.useState({ n: 0, on: false });\n  const vars = { \"--hb-qa6-c\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <>\n      <style href=\"hb-button-arrow-reveal\" precedence=\"default\">{css}</style>\n      <button\n        type={type}\n        className={`hb-qa6 ${className}`}\n        style={vars}\n        data-variant={variant}\n        data-size={size}\n        disabled={disabled || loading}\n        aria-busy={loading || undefined}\n        onClick={(e) => {\n          setRun((r) => ({ n: r.n + 1, on: true }));\n          onClick?.(e);\n        }}\n        {...rest}\n      >\n        <span className=\"hb-qa6-in\">\n          {children}\n          {loading ? (\n            <span className=\"hb-qa6-sp\" aria-hidden=\"true\" />\n          ) : (\n            <svg\n              key={run.n}\n              className=\"hb-qa6-ar\"\n              viewBox=\"0 0 24 24\"\n              aria-hidden=\"true\"\n              focusable=\"false\"\n              data-go={run.on ? \"true\" : undefined}\n              onAnimationEnd={(e) => {\n                if (e.animationName === \"hb-qa6-go\") setRun((r) => ({ ...r, on: false }));\n              }}\n            >\n              <path d=\"M5 12h14M13 6l6 6-6 6\" />\n            </svg>\n          )}\n        </span>\n      </button>\n    </>\n  );\n}\n"
    }
  ]
}