{
  "$schema": "https://www.cooki-ui.design/schema/registry-item.json",
  "name": "glowing-cards",
  "type": "registry:ui",
  "title": "Glowing Cards",
  "description": "Multi-card interactive spotlight grid with mouse-tracking radial proximity borders and specular illumination.",
  "category": "cards",
  "dependencies": [
    "clsx",
    "tailwind-merge"
  ],
  "tags": [
    "cards",
    "glowing",
    "spotlight",
    "hover",
    "border",
    "proximity",
    "specular"
  ],
  "files": [
    {
      "path": "registry/cards/glowing-cards/glowing-cards.tsx",
      "type": "registry:ui",
      "target": "components/ui/glowing-cards.tsx",
      "content": "\"use client\";\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport interface GlowingCardProps {\n  children: React.ReactNode;\n  className?: string;\n  glowColor?: string;\n  hoverEffect?: boolean;\n}\n\nexport interface GlowingCardsProps {\n  children: React.ReactNode;\n  className?: string;\n  /** Enable the glowing overlay effect */\n  enableGlow?: boolean;\n  /** Size of the glow effect radius */\n  glowRadius?: number;\n  /** Opacity of the glow effect */\n  glowOpacity?: number;\n  /** Animation duration for glow transitions */\n  animationDuration?: number;\n  /** Enable hover effects on individual cards */\n  enableHover?: boolean;\n  /** Gap between cards */\n  gap?: string;\n  /** Maximum width of cards container */\n  maxWidth?: string;\n  /** Padding around the container */\n  padding?: string;\n  /** Background color for the container */\n  backgroundColor?: string;\n  /** Border radius for cards */\n  borderRadius?: string;\n  /** Enable responsive layout */\n  responsive?: boolean;\n  /** Custom CSS variables for theming */\n  customTheme?: {\n    cardBg?: string;\n    cardBorder?: string;\n    textColor?: string;\n    hoverBg?: string;\n  };\n}\n\nexport const GlowingCard: React.FC<GlowingCardProps> = ({\n  children,\n  className,\n  glowColor = \"#3b82f6\",\n  hoverEffect = true,\n  ...props\n}) => {\n  return (\n    <div\n      className={cn(\n        \"relative flex-1 min-w-[14rem] p-6 rounded-2xl text-black dark:text-white\",\n        \"bg-background border \",\n        \"transition-all duration-400 ease-out\",\n        className\n      )}\n      style={{\n        '--glow-color': glowColor, // CSS variable definition\n      } as React.CSSProperties}\n      {...props}\n    >\n      {children}\n    </div>\n  );\n};\n\nexport const GlowingCards: React.FC<GlowingCardsProps> = ({\n  children,\n  className,\n  enableGlow = true,\n  glowRadius = 25,\n  glowOpacity = 1,\n  animationDuration = 400,\n  enableHover = true,\n  gap = \"2.5rem\",\n  maxWidth = \"75rem\",\n  padding = \"3rem 1.5rem\",\n  backgroundColor,\n  borderRadius = \"1rem\",\n  responsive = true,\n  customTheme,\n}) => {\n  const containerRef = useRef<HTMLDivElement>(null);\n  const overlayRef = useRef<HTMLDivElement>(null);\n  const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 });\n  const [showOverlay, setShowOverlay] = useState(false);\n\n  useEffect(() => {\n    const container = containerRef.current;\n    const overlay = overlayRef.current;\n\n    if (!container || !overlay || !enableGlow) return;\n\n    const handleMouseMove = (e: MouseEvent) => {\n      const rect = container.getBoundingClientRect();\n      const x = e.clientX - rect.left;\n      const y = e.clientY - rect.top;\n\n      setMousePosition({ x, y });\n      setShowOverlay(true);\n\n      // Using string concatenation for style properties\n      overlay.style.setProperty('--x', x + 'px');\n      overlay.style.setProperty('--y', y + 'px');\n      overlay.style.setProperty('--opacity', glowOpacity.toString());\n    };\n\n    const handleMouseLeave = () => {\n      setShowOverlay(false);\n      overlay.style.setProperty('--opacity', '0');\n    };\n\n    container.addEventListener('mousemove', handleMouseMove);\n    container.addEventListener('mouseleave', handleMouseLeave);\n\n    return () => {\n      container.removeEventListener('mousemove', handleMouseMove);\n      container.removeEventListener('mouseleave', handleMouseLeave);\n    };\n  }, [enableGlow, glowOpacity]);\n\n  const containerStyle = {\n    '--gap': gap,\n    '--max-width': maxWidth,\n    '--padding': padding,\n    '--border-radius': borderRadius,\n    '--animation-duration': animationDuration + 'ms', // Concatenation\n    '--glow-radius': glowRadius + 'rem', // Concatenation\n    '--glow-opacity': glowOpacity,\n    backgroundColor: backgroundColor || undefined,\n    ...customTheme,\n  } as React.CSSProperties;\n\n  return (\n    <div\n      className={cn(\"relative w-full\", className)}\n      style={containerStyle}\n    >\n      <div\n        ref={containerRef}\n        className={cn(\n          \"relative max-w-[var(--max-width)] mx-auto \",\n          \"px-6 py-2\"\n        )}\n        style={{ padding: \"var(--padding)\" }} // String literal\n      >\n        <div\n          className={cn(\n            \"flex items-center justify-center flex-wrap gap-[var(--gap)]\",\n            responsive && \"flex-col sm:flex-row \"\n          )}\n        >\n          {children}\n        </div>\n\n        {enableGlow && (\n          <div\n            ref={overlayRef}\n            className={cn(\n              \"absolute inset-0 pointer-events-none select-none\",\n              \"opacity-0 transition-all [transition-duration:var(--animation-duration)] ease-out\"\n            )}\n            style={{\n              // String concatenation for WebkitMask and mask\n              WebkitMask:\n                \"radial-gradient(var(--glow-radius) var(--glow-radius) at var(--x, 0) var(--y, 0), #000 1%, transparent 50%)\",\n              mask:\n                \"radial-gradient(var(--glow-radius) var(--glow-radius) at var(--x, 0) var(--y, 0), #000 1%, transparent 50%)\",\n              opacity: showOverlay ? 'var(--opacity)' : '0',\n            }}\n          >\n            <div\n              className={cn(\n                \"flex items-center justify-center flex-wrap gap-[var(--gap)] max-w-[var(--max-width)] center mx-auto\",\n                responsive && \"flex-col sm:flex-row\"\n              )}\n              style={{ padding: \"var(--padding)\" }} // String literal\n            >\n              {React.Children.map(children, (child, index) => {\n                if (React.isValidElement(child) && child.type === GlowingCard) {\n                  const element = child as React.ReactElement<any>;\n                  const cardGlowColor = element.props.glowColor || \"#3b82f6\";\n                  return React.cloneElement(element, {\n                    className: cn(\n                      element.props.className,\n                      \"bg-opacity-15 dark:bg-opacity-15\",\n                      \"border-opacity-100 dark:border-opacity-100\"\n                    ),\n                    style: {\n                      ...element.props.style,\n                      // String concatenation for background, border, and boxShadow\n                      backgroundColor: cardGlowColor + \"15\",\n                      borderColor: cardGlowColor,\n                      boxShadow: \"0 0 0 1px inset \" + cardGlowColor,\n                    },\n                  });\n                }\n                return child;\n              })}\n            </div>\n          </div>\n        )}\n      </div>\n    </div>\n  );\n};\n\nexport { GlowingCards as default };"
    }
  ]
}