{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "background-beams",
  "title": "Background Beams",
  "author": "VenusUI",
  "description": "Curved lines across a section with light traveling along them.",
  "files": [
    {
      "path": "registry/default/ui/background-beams.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\ninterface BackgroundBeamsProps extends React.ComponentProps<\"div\"> {\n  /** Number of beams. */\n  count?: number\n  /** Start and end color of the light that travels along each beam. Any CSS color. */\n  colors?: [string, string]\n}\n\n/**\n * Curved lines sweeping across a section, with light traveling along them.\n * Place inside a `relative` element; it fills it and sits behind the content.\n * Decorative: hidden from assistive technology, and the light stops with\n * reduced motion.\n */\nfunction BackgroundBeams({\n  count = 18,\n  colors = [\"oklch(0.72 0.18 295)\", \"oklch(0.8 0.13 210)\"],\n  className,\n  ...props\n}: BackgroundBeamsProps) {\n  const id = React.useId().replace(/:/g, \"\")\n  const beams = Array.from({ length: count }, (_, i) => {\n    const x = -260 + i * 52\n    return {\n      d: `M${x} 660 C${x + 180} 470 ${x + 40} 260 ${x + 330} 60 S${x + 560} -120 ${x + 700} -220`,\n      // Fixed, pseudo-random timing so server and browser render the same thing.\n      duration: 7 + ((i * 37) % 6),\n      delay: -((i * 1.7) % 9),\n    }\n  })\n\n  return (\n    <div\n      aria-hidden=\"true\"\n      data-slot=\"background-beams\"\n      className={cn(\"pointer-events-none absolute inset-0 -z-10 overflow-hidden\", className)}\n      {...props}\n    >\n      <svg className=\"size-full\" viewBox=\"0 0 800 600\" preserveAspectRatio=\"xMidYMid slice\" fill=\"none\">\n        <defs>\n          <linearGradient id={`${id}-light`} x1=\"0\" y1=\"1\" x2=\"1\" y2=\"0\">\n            <stop offset=\"0%\" stopColor={colors[0]} />\n            <stop offset=\"100%\" stopColor={colors[1]} />\n          </linearGradient>\n        </defs>\n        {beams.map((beam, i) => (\n          <g key={i}>\n            <path d={beam.d} stroke=\"currentColor\" strokeOpacity=\"0.06\" strokeWidth=\"1\" />\n            <path\n              d={beam.d}\n              pathLength={1}\n              stroke={`url(#${id}-light)`}\n              strokeWidth=\"1.5\"\n              strokeLinecap=\"round\"\n              strokeDasharray=\"0.12 1\"\n              className=\"animate-beam-travel motion-reduce:hidden\"\n              style={{ animationDuration: `${beam.duration}s`, animationDelay: `${beam.delay}s` }}\n            />\n          </g>\n        ))}\n      </svg>\n    </div>\n  )\n}\n\nexport { BackgroundBeams, type BackgroundBeamsProps }\n",
      "type": "registry:ui"
    }
  ],
  "cssVars": {
    "theme": {
      "animate-beam-travel": "beam-travel 8s linear infinite"
    }
  },
  "css": {
    "@keyframes beam-travel": {
      "from": {
        "stroke-dashoffset": "1.12"
      },
      "to": {
        "stroke-dashoffset": "0"
      }
    }
  },
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "backgrounds",
    "animations",
    "effects"
  ],
  "type": "registry:ui"
}