{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pulsing-border-card",
  "title": "Pulsing Border Card",
  "description": "A card wrapped in a living, pulsing glow that bleeds softly past its edges.",
  "dependencies": [
    "@paper-design/shaders-react"
  ],
  "files": [
    {
      "path": "registry/shaders/pulsing-border-card/pulsing-border-card.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { PulsingBorder } from \"@paper-design/shaders-react\"\n\nimport { cn } from \"@/lib/utils\"\n\n// How far (in px) the glow is allowed to bleed outside the card.\nconst GLOW = 48\n\ntype PulsingBorderCardProps = React.ComponentProps<\"div\"> & {\n  colors?: string[]\n  speed?: number\n}\n\nfunction PulsingBorderCard({\n  colors = [\"#0dc1fd\", \"#d915ef\", \"#ff3f2ecc\"],\n  speed = 1,\n  className,\n  children,\n  ...props\n}: PulsingBorderCardProps) {\n  const ref = React.useRef<HTMLDivElement>(null)\n  const [size, setSize] = React.useState({ width: 0, height: 0 })\n\n  React.useEffect(() => {\n    const element = ref.current\n    if (!element) return\n\n    const observer = new ResizeObserver(([entry]) => {\n      const { width, height } = entry.contentRect\n      setSize({ width: width + GLOW * 2, height: height + GLOW * 2 })\n    })\n    observer.observe(element)\n\n    return () => observer.disconnect()\n  }, [])\n\n  // The shader expresses margins as a fraction of the canvas, so convert the\n  // pixel outset into fractions to keep the border glued to the card edges.\n  const marginX = size.width ? GLOW / size.width : 0\n  const marginY = size.height ? GLOW / size.height : 0\n\n  return (\n    <div\n      ref={ref}\n      data-slot=\"pulsing-border-card\"\n      className={cn(\"relative isolate w-full max-w-md\", className)}\n      {...props}\n    >\n      {size.width > 0 && (\n        <PulsingBorder\n          aria-hidden\n          className=\"pointer-events-none absolute -z-10\"\n          style={{ inset: -GLOW }}\n          colors={colors}\n          colorBack=\"#00000000\"\n          speed={speed}\n          roundness={0}\n          thickness={0.06}\n          softness={0.75}\n          intensity={0.3}\n          bloom={0.3}\n          spots={4}\n          spotSize={0.5}\n          pulse={0.25}\n          smoke={0.3}\n          smokeSize={0.5}\n          scale={1}\n          marginLeft={marginX}\n          marginRight={marginX}\n          marginTop={marginY}\n          marginBottom={marginY}\n        />\n      )}\n      <div className=\"relative h-full bg-card p-6 text-card-foreground\">\n        {children ?? (\n          <div className=\"flex flex-col gap-2\">\n            <span className=\"font-mono text-[10px] tracking-widest text-muted-foreground uppercase\">\n              Assistant\n            </span>\n            <h3 className=\"font-heading text-lg leading-tight\">\n              Ask me anything\n            </h3>\n            <p className=\"text-sm text-muted-foreground\">\n              A soft, living glow that draws attention without shouting. Wrap\n              any content to make it feel alive.\n            </p>\n          </div>\n        )}\n      </div>\n    </div>\n  )\n}\n\nexport { PulsingBorderCard }\n",
      "type": "registry:component"
    }
  ],
  "categories": [
    "components",
    "cards"
  ],
  "type": "registry:component"
}