{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "glow-border",
  "title": "Glow border",
  "description": "A slowly rotating gradient arc travels around the card border with a soft glow that intensifies on hover and focus.",
  "dependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/components/cards/glow-border.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\n\n// A registered <angle> property lets the conic gradient rotate. Browsers without @property show it still.\nconst CSS = `\n@property --pc-glow-border-angle { syntax: \"<angle>\"; inherits: true; initial-value: 0deg }\n@keyframes pc-glow-border-spin { to { --pc-glow-border-angle: 360deg } }\n.pc-glow-border {\n  --pc-gb-gradient: conic-gradient(from var(--pc-glow-border-angle), var(--pc-gb-stops));\n  position: relative; isolation: isolate;\n  padding: var(--pc-gb-width, 1px);\n  background: var(--pc-gb-gradient), var(--border);\n  animation: pc-glow-border-spin var(--pc-gb-duration, 6s) linear infinite;\n}\n.pc-glow-border::before {\n  content: \"\"; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;\n  background: var(--pc-gb-gradient);\n  filter: blur(var(--pc-gb-blur, 14px));\n  opacity: var(--pc-gb-rest, 0.25);\n  transition: opacity 0.4s ease, filter 0.4s ease;\n}\n.pc-glow-border:is(:hover, :focus-within, [data-active])::before { opacity: var(--pc-gb-hover, 0.75); filter: blur(calc(var(--pc-gb-blur, 14px) * 1.4)) }\n.pc-glow-border[data-paused] { animation-play-state: paused }\n:where(.dark) .pc-glow-border::before { opacity: calc(var(--pc-gb-rest, 0.25) * 1.6) }\n:where(.dark) .pc-glow-border:is(:hover, :focus-within, [data-active])::before { opacity: var(--pc-gb-hover, 0.75) }\n@media (prefers-reduced-motion: reduce) { .pc-glow-border { animation: none } .pc-glow-border::before { transition: none } }\n`\n\nexport type GlowBorderProps = React.HTMLAttributes<HTMLDivElement> & {\n  /** Colors of the moving arc. Defaults to the theme's chart colors. */\n  colors?: string[]\n  /** Seconds per rotation. */\n  duration?: number\n  /** Border width in px. */\n  borderWidth?: number\n  /** Glow blur in px. */\n  blur?: number\n  /** Glow opacity at rest and on hover/focus (0–1). */\n  restOpacity?: number\n  /** Glow opacity on hover, with focus inside, or while active (0 to 1). */\n  hoverOpacity?: number\n  /** Keep the intense state on, e.g. for a selected plan. */\n  active?: boolean\n  /** Classes for the inner surface. */\n  innerClassName?: string\n}\n\n/**\n * A card whose border carries a slowly rotating gradient arc with a soft glow behind it; the glow intensifies on\n * hover and focus. Pauses off-screen and stops for reduced motion.\n */\nexport function GlowBorder({\n  colors = [\"var(--chart-1)\", \"var(--chart-4)\", \"var(--chart-5)\"],\n  duration = 6,\n  borderWidth = 1,\n  blur = 14,\n  restOpacity = 0.25,\n  hoverOpacity = 0.75,\n  active = false,\n  className,\n  innerClassName,\n  style,\n  children,\n  ...props\n}: GlowBorderProps) {\n  const ref = React.useRef<HTMLDivElement>(null)\n  const [paused, setPaused] = React.useState(false)\n\n  React.useEffect(() => {\n    const el = ref.current\n    if (!el) return\n    const io = new IntersectionObserver(([entry]) => entry && setPaused(!entry.isIntersecting))\n    io.observe(el)\n    return () => io.disconnect()\n  }, [])\n\n  // The arc covers the first ~55% of the circle and fades out at both ends; the rest shows the plain border.\n  const step = 45 / Math.max(1, colors.length - 1)\n  const stops = [\"transparent 0%\", ...colors.map((c, i) => `${c} ${(5 + i * step).toFixed(1)}%`), \"transparent 55%\", \"transparent 100%\"].join(\", \")\n\n  return (\n    <div\n      ref={ref}\n      data-active={active ? \"\" : undefined}\n      data-paused={paused ? \"\" : undefined}\n      className={cn(\"pc-glow-border rounded-xl\", className)}\n      style={{\n        ...style,\n        [\"--pc-gb-stops\" as string]: stops,\n        [\"--pc-gb-duration\" as string]: `${duration}s`,\n        [\"--pc-gb-width\" as string]: `${borderWidth}px`,\n        [\"--pc-gb-blur\" as string]: `${blur}px`,\n        [\"--pc-gb-rest\" as string]: restOpacity,\n        [\"--pc-gb-hover\" as string]: hoverOpacity,\n      }}\n      {...props}\n    >\n      <style href=\"pc-glow-border\" precedence=\"default\">\n        {CSS}\n      </style>\n      <div className={cn(\"h-full rounded-[inherit] bg-card text-card-foreground\", innerClassName)}>\n        {children}\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/goodui/glow-border.tsx"
    }
  ],
  "categories": [
    "components",
    "cards"
  ],
  "type": "registry:component"
}