"use client"; import React from "react"; import { motion } from "framer-motion"; import { cn } from "../utils"; interface RaysBackgroundProps { /** Theme variant - 'light' or 'dark' */ theme?: "light" | "dark"; /** Enable/disable animation */ animated?: boolean; /** Animation speed multiplier (1 = normal, 2 = double speed, 0.5 = half speed) */ animationSpeed?: number; /** Opacity of the effect (0-1) */ opacity?: number; /** Custom color scheme for rays */ colors?: { purple?: string; yellow?: string; pink?: string; teal?: string; blue?: string; }; /** Blur amount for rays in pixels */ blurAmount?: number; /** Children to render on top of the background */ children?: React.ReactNode; /** Additional className for the wrapper */ className?: string; } const RaysBackground: React.FC = ({ theme = "dark", animated = true, animationSpeed = 1, opacity = 0.7, colors = { purple: "rgba(169, 73, 207, 1)", yellow: "rgba(238, 248, 86, 1)", pink: "rgba(248, 72, 202, 1)", teal: "rgba(119, 235, 195, 1)", blue: "rgba(77, 71, 214, 1)", }, blurAmount = 6, children, className = "", }) => { const isLightTheme = theme === "light"; return (
{/* Color Ray Container */}
{/* Light Rays */}
{/* Before pseudo element - Light rays pattern 1 */} {/* After pseudo element - Light rays pattern 2 */}
{/* Color Rays */}
{/* Color Rays Before */} {/* Color Rays After */}
{/* Content */}
{children}
); }; export default RaysBackground;