{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "glow-border",
  "type": "registry:component",
  "title": "Glow Border",
  "description": "A card whose border lights up around the cursor, like modern SaaS cards.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hover",
    "border",
    "glow",
    "card",
    "spotlight",
    "hover"
  ],
  "docs": "https://hyperblur.dev/effects/glow-border",
  "files": [
    {
      "path": "registry/hyperblur/glow-border.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/glow-border.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface GlowBorderProps extends React.HTMLAttributes<HTMLDivElement> {\n  children: React.ReactNode;\n  color?: string;\n  radius?: number;\n  borderWidth?: number;\n  rounded?: number;\n}\n\nconst css = `\n.hb-gb {\n  --hb-x: 50%; --hb-y: 50%;\n  position: relative;\n  border-radius: var(--hb-rd);\n}\n.hb-gb::before, .hb-gb::after {\n  content: \"\"; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;\n  padding: var(--hb-bw);\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}\n.hb-gb::after { background: rgba(255, 255, 255, 0.08); }\n.hb-gb::before {\n  z-index: 1;\n  background: radial-gradient(circle var(--hb-r) at var(--hb-x) var(--hb-y), var(--hb-c), transparent 70%);\n  opacity: 0;\n  transition: opacity .3s ease;\n}\n.hb-gb:hover::before { opacity: 1; }\n@media (prefers-reduced-motion: reduce) {\n  .hb-gb::before { transition: none; }\n}\n`;\n\nexport function GlowBorder({\n  children,\n  color = \"#2f7bff\",\n  radius = 240,\n  borderWidth = 1,\n  rounded = 16,\n  className = \"\",\n  style,\n  onPointerMove,\n  ...rest\n}: GlowBorderProps) {\n  const ref = React.useRef<HTMLDivElement>(null);\n\n  function handleMove(e: React.PointerEvent<HTMLDivElement>) {\n    onPointerMove?.(e);\n    const el = ref.current;\n    if (!el) return;\n    const r = el.getBoundingClientRect();\n    el.style.setProperty(\"--hb-x\", `${(e.clientX - r.left).toFixed(1)}px`);\n    el.style.setProperty(\"--hb-y\", `${(e.clientY - r.top).toFixed(1)}px`);\n  }\n\n  const vars = {\n    \"--hb-c\": color,\n    \"--hb-r\": `${radius}px`,\n    \"--hb-bw\": `${borderWidth}px`,\n    \"--hb-rd\": `${rounded}px`,\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <div\n      ref={ref}\n      className={`hb-gb ${className}`}\n      style={vars}\n      onPointerMove={handleMove}\n      {...rest}\n    >\n      <style href=\"hb-glow-border\" precedence=\"default\">{css}</style>\n      {children}\n    </div>\n  );\n}\n"
    }
  ]
}