{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button-aurora",
  "type": "registry:component",
  "title": "Button Aurora",
  "description": "A frosted glass button floating on a slowly drifting aurora of three colors, with a matching gradient rim that flows around the edge. Hover lets the light swell out from underneath.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "buttons",
    "button",
    "aurora",
    "gradient",
    "glass",
    "glow",
    "ambient"
  ],
  "docs": "https://hyperblur.dev/effects/button-aurora",
  "files": [
    {
      "path": "registry/hyperblur/button-aurora.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/button-aurora.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ButtonAuroraProps\n  extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"color\"> {\n  colors?: [string, string, string];\n  intensity?: number;\n  size?: \"sm\" | \"md\" | \"lg\";\n}\n\nconst css = `\n.hb-xa6 {\n  --hb-xa6-a: #22d3ee;\n  --hb-xa6-b: #a855f7;\n  --hb-xa6-c: #f472b6;\n  --hb-xa6-i: 0.7;\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;\n  font: inherit;\n  font-size: 15px;\n  font-weight: 600;\n  line-height: 1;\n  color: #f4f4f5;\n  background: transparent;\n  border: 0;\n  border-radius: 14px;\n  cursor: pointer;\n  isolation: isolate;\n  user-select: none;\n  -webkit-tap-highlight-color: transparent;\n}\n.hb-xa6 *, .hb-xa6 *::before, .hb-xa6 *::after { box-sizing: border-box; }\n.hb-xa6[data-size=\"sm\"] { font-size: 13px; }\n.hb-xa6[data-size=\"lg\"] { font-size: 17px; }\n.hb-xa6:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }\n.hb-xa6:disabled { opacity: 0.45; cursor: not-allowed; }\n.hb-xa6-halo {\n  position: absolute;\n  inset: -6px -10px;\n  z-index: -2;\n  border-radius: 22px;\n  filter: blur(16px) saturate(1.3);\n  opacity: calc(var(--hb-xa6-i) * 0.75);\n  transform: scale(0.94);\n  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);\n  pointer-events: none;\n  overflow: hidden;\n}\n.hb-xa6:hover:not(:disabled) .hb-xa6-halo,\n.hb-xa6:focus-visible .hb-xa6-halo { opacity: var(--hb-xa6-i); transform: scale(1.04); }\n.hb-xa6-blob {\n  position: absolute;\n  width: 70%;\n  height: 160%;\n  top: -30%;\n  border-radius: 50%;\n  mix-blend-mode: screen;\n}\n.hb-xa6-blob[data-k=\"a\"] { left: -10%; background: var(--hb-xa6-a); animation: hb-xa6-da 7s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }\n.hb-xa6-blob[data-k=\"b\"] { left: 20%; background: var(--hb-xa6-b); animation: hb-xa6-db 9s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }\n.hb-xa6-blob[data-k=\"c\"] { left: 45%; background: var(--hb-xa6-c); animation: hb-xa6-dc 8s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }\n.hb-xa6-rim {\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  border-radius: inherit;\n  padding: 1px;\n  background: linear-gradient(110deg, var(--hb-xa6-a), var(--hb-xa6-b), var(--hb-xa6-c), var(--hb-xa6-a));\n  background-size: 300% 100%;\n  animation: hb-xa6-rim 6s linear infinite;\n  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);\n  -webkit-mask-composite: xor;\n  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);\n  opacity: 0.85;\n}\n.hb-xa6-face {\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  gap: 0.6em;\n  padding: 0.95em 1.6em;\n  border-radius: inherit;\n  white-space: nowrap;\n  background:\n    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 50%),\n    rgba(12, 12, 16, 0.86);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -10px 18px -10px color-mix(in srgb, var(--hb-xa6-b) 50%, transparent);\n  -webkit-backdrop-filter: blur(10px);\n  backdrop-filter: blur(10px);\n  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);\n}\n.hb-xa6:active:not(:disabled) .hb-xa6-face { transform: scale(0.97); }\n.hb-xa6-spark { width: 1em; height: 1em; flex: none; }\n.hb-xa6:hover:not(:disabled) .hb-xa6-spark { animation: hb-xa6-tw 1.2s cubic-bezier(0.34, 1.56, 0.64, 1); }\n@keyframes hb-xa6-da { to { transform: translate(40%, 12%) scale(1.2); } }\n@keyframes hb-xa6-db { to { transform: translate(-30%, -10%) scale(0.85); } }\n@keyframes hb-xa6-dc { to { transform: translate(-45%, 8%) scale(1.15); } }\n@keyframes hb-xa6-rim { to { background-position: 300% 0; } }\n@keyframes hb-xa6-tw { 0% { transform: scale(1) rotate(0); } 50% { transform: scale(1.3) rotate(90deg); } 100% { transform: scale(1) rotate(180deg); } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-xa6-blob, .hb-xa6-rim, .hb-xa6:hover:not(:disabled) .hb-xa6-spark { animation: none; }\n  .hb-xa6-halo, .hb-xa6-face { transition: none; }\n}\n`;\n\nexport function ButtonAurora({\n  children = \"Generate palette\",\n  colors = [\"#22d3ee\", \"#a855f7\", \"#f472b6\"],\n  intensity = 0.7,\n  size = \"md\",\n  type = \"button\",\n  className = \"\",\n  style,\n  ...rest\n}: ButtonAuroraProps) {\n  const raw = React.useId();\n  const gid = `hb-xa6-g${raw.replace(/[^a-zA-Z0-9]/g, \"\")}`;\n  const vars = {\n    \"--hb-xa6-a\": colors[0],\n    \"--hb-xa6-b\": colors[1],\n    \"--hb-xa6-c\": colors[2],\n    \"--hb-xa6-i\": Math.max(0, Math.min(1, intensity)).toFixed(2),\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <>\n      <style href=\"hb-button-aurora\" precedence=\"default\">{css}</style>\n      <button type={type} className={`hb-xa6 ${className}`} style={vars} data-size={size} {...rest}>\n        <span className=\"hb-xa6-halo\" aria-hidden=\"true\">\n          <span className=\"hb-xa6-blob\" data-k=\"a\" />\n          <span className=\"hb-xa6-blob\" data-k=\"b\" />\n          <span className=\"hb-xa6-blob\" data-k=\"c\" />\n        </span>\n        <span className=\"hb-xa6-rim\" aria-hidden=\"true\" />\n        <span className=\"hb-xa6-face\">\n          <svg className=\"hb-xa6-spark\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n            <defs>\n              <linearGradient id={gid} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\n                <stop offset=\"0\" stopColor={colors[0]} />\n                <stop offset=\"0.5\" stopColor={colors[1]} />\n                <stop offset=\"1\" stopColor={colors[2]} />\n              </linearGradient>\n            </defs>\n            <path d=\"M8 0.8l1.6 4.6 4.6 1.6-4.6 1.6L8 13.2 6.4 8.6 1.8 7l4.6-1.6z\" fill={`url(#${gid})`} />\n            <path d=\"M13 10.5l.6 1.6 1.6.6-1.6.6-.6 1.6-.6-1.6-1.6-.6 1.6-.6z\" fill={`url(#${gid})`} />\n          </svg>\n          {children}\n        </span>\n      </button>\n    </>\n  );\n}\n"
    }
  ]
}