{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button-marquee",
  "type": "registry:component",
  "title": "Button Marquee",
  "description": "On hover the label slides away and a looping ticker of the same words runs through a soft edge fade. A diagonal arrow chip swaps for a fresh arrow at the same moment.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "buttons",
    "button",
    "marquee",
    "ticker",
    "hover",
    "arrow",
    "pill"
  ],
  "docs": "https://hyperblur.dev/effects/button-marquee",
  "files": [
    {
      "path": "registry/hyperblur/button-marquee.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/button-marquee.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ButtonMarqueeProps\n  extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"color\"> {\n  marquee?: string;\n  accent?: string;\n  speed?: number;\n  size?: \"sm\" | \"md\" | \"lg\";\n}\n\nconst css = `\n.hb-xa1 {\n  --hb-xa1-c: #c8ff4d;\n  --hb-xa1-s: 7s;\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  gap: 0.75em;\n  box-sizing: border-box;\n  margin: 0;\n  padding: 0.38em 0.38em 0.38em 1.35em;\n  font: inherit;\n  font-size: 15px;\n  font-weight: 600;\n  line-height: 1;\n  letter-spacing: -0.005em;\n  color: #ededed;\n  background: linear-gradient(180deg, #1c1c1c, #121212);\n  border: 0;\n  border-radius: 999px;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px #2a2a2a, 0 8px 24px -12px rgba(0, 0, 0, 0.8);\n  cursor: pointer;\n  user-select: none;\n  -webkit-tap-highlight-color: transparent;\n  transition: box-shadow 0.3s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);\n}\n.hb-xa1 *, .hb-xa1 *::before, .hb-xa1 *::after { box-sizing: border-box; }\n.hb-xa1[data-size=\"sm\"] { font-size: 13px; }\n.hb-xa1[data-size=\"lg\"] { font-size: 17px; }\n.hb-xa1:hover:not(:disabled), .hb-xa1:focus-visible {\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px color-mix(in srgb, var(--hb-xa1-c) 40%, #2a2a2a), 0 10px 30px -14px color-mix(in srgb, var(--hb-xa1-c) 45%, transparent);\n}\n.hb-xa1:active:not(:disabled) { transform: scale(0.97); }\n.hb-xa1:focus-visible { outline: 2px solid var(--hb-xa1-c); outline-offset: 3px; }\n.hb-xa1:disabled { opacity: 0.45; cursor: not-allowed; }\n.hb-xa1-face {\n  position: relative;\n  display: block;\n  overflow: hidden;\n  padding: 0.3em 0;\n  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);\n  mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);\n}\n.hb-xa1-static {\n  display: block;\n  white-space: nowrap;\n  padding: 0 0.85em;\n  transition: transform 0.5s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.35s ease;\n}\n.hb-xa1-run {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  display: flex;\n  align-items: center;\n  width: max-content;\n  opacity: 0;\n  transform: translateY(110%);\n  transition: transform 0.5s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.35s ease;\n}\n.hb-xa1-loop {\n  display: flex;\n  align-items: center;\n  flex: none;\n  animation: hb-xa1-roll var(--hb-xa1-s) linear infinite;\n  animation-play-state: paused;\n}\n.hb-xa1-item { display: inline-flex; align-items: center; white-space: nowrap; }\n.hb-xa1-star {\n  width: 0.55em;\n  height: 0.55em;\n  margin: 0 0.7em;\n  flex: none;\n  color: var(--hb-xa1-c);\n}\n.hb-xa1:hover:not(:disabled) .hb-xa1-static,\n.hb-xa1:focus-visible .hb-xa1-static { transform: translateY(-110%); opacity: 0; }\n.hb-xa1:hover:not(:disabled) .hb-xa1-run,\n.hb-xa1:focus-visible .hb-xa1-run { transform: translateY(0); opacity: 1; }\n.hb-xa1:hover:not(:disabled) .hb-xa1-loop,\n.hb-xa1:focus-visible .hb-xa1-loop { animation-play-state: running; }\n.hb-xa1-chip {\n  position: relative;\n  display: grid;\n  place-items: center;\n  width: 2.3em;\n  height: 2.3em;\n  flex: none;\n  color: #0a0a0a;\n  background: var(--hb-xa1-c);\n  border-radius: 999px;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 4px rgba(0, 0, 0, 0.18);\n  overflow: hidden;\n}\n.hb-xa1-arrow {\n  width: 1em;\n  height: 1em;\n  transition: transform 0.55s cubic-bezier(0.7, 0, 0.2, 1);\n}\n.hb-xa1-arrow + .hb-xa1-arrow { position: absolute; transform: translate(-180%, 180%); }\n.hb-xa1:hover:not(:disabled) .hb-xa1-arrow,\n.hb-xa1:focus-visible .hb-xa1-arrow { transform: translate(180%, -180%); }\n.hb-xa1:hover:not(:disabled) .hb-xa1-arrow + .hb-xa1-arrow,\n.hb-xa1:focus-visible .hb-xa1-arrow + .hb-xa1-arrow { transform: translate(0, 0); }\n@keyframes hb-xa1-roll { to { transform: translateX(-100%); } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-xa1, .hb-xa1-static, .hb-xa1-run, .hb-xa1-arrow { transition: none; }\n  .hb-xa1-loop { animation: none; }\n  .hb-xa1:hover:not(:disabled) .hb-xa1-static, .hb-xa1:focus-visible .hb-xa1-static { transform: none; opacity: 1; }\n  .hb-xa1:hover:not(:disabled) .hb-xa1-run, .hb-xa1:focus-visible .hb-xa1-run { opacity: 0; }\n  .hb-xa1:hover:not(:disabled) .hb-xa1-arrow, .hb-xa1:focus-visible .hb-xa1-arrow { transform: none; }\n}\n`;\n\nfunction Arrow() {\n  return (\n    <svg className=\"hb-xa1-arrow\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n      <path d=\"M4.5 11.5l7-7M6 4.5h5.5V10\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n    </svg>\n  );\n}\n\nfunction Star() {\n  return (\n    <svg className=\"hb-xa1-star\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n      <path d=\"M5 0l1.2 3.8L10 5 6.2 6.2 5 10 3.8 6.2 0 5l3.8-1.2z\" fill=\"currentColor\" />\n    </svg>\n  );\n}\n\nexport function ButtonMarquee({\n  children = \"Book a demo\",\n  marquee,\n  accent = \"#c8ff4d\",\n  speed = 7,\n  size = \"md\",\n  type = \"button\",\n  className = \"\",\n  style,\n  ...rest\n}: ButtonMarqueeProps) {\n  const text = marquee ?? (typeof children === \"string\" ? children : \"Book a demo\");\n  const items = [0, 1, 2];\n  const vars = {\n    \"--hb-xa1-c\": accent,\n    \"--hb-xa1-s\": `${Math.max(1, speed).toFixed(2)}s`,\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <>\n      <style href=\"hb-button-marquee\" precedence=\"default\">{css}</style>\n      <button type={type} className={`hb-xa1 ${className}`} style={vars} data-size={size} {...rest}>\n        <span className=\"hb-xa1-face\">\n          <span className=\"hb-xa1-static\">{children}</span>\n          <span className=\"hb-xa1-run\" aria-hidden=\"true\">\n            {[0, 1].map((loop) => (\n              <span className=\"hb-xa1-loop\" key={loop}>\n                {items.map((i) => (\n                  <span className=\"hb-xa1-item\" key={i}>\n                    {text}\n                    <Star />\n                  </span>\n                ))}\n              </span>\n            ))}\n          </span>\n        </span>\n        <span className=\"hb-xa1-chip\" aria-hidden=\"true\">\n          <Arrow />\n          <Arrow />\n        </span>\n      </button>\n    </>\n  );\n}\n"
    }
  ]
}