{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "meteors", "title": "Meteors", "description": "Shooting meteor effect that flies across cards or backgrounds.", "dependencies": [], "files": [ { "path": "registry/pioneerui/meteors.tsx", "content": "\"use client\"\n\nimport React, { useEffect, useState, type CSSProperties } from \"react\"\nimport { cn } from \"@/lib/utils\"\n\ninterface MeteorStyle extends CSSProperties {\n \"--angle\": string\n}\n\nexport interface MeteorsProps {\n number?: number\n className?: string\n}\n\nexport function Meteors({ number = 20, className }: MeteorsProps) {\n const [meteorStyles, setMeteorStyles] = useState([])\n\n useEffect(() => {\n const styles: MeteorStyle[] = Array.from({ length: number }, () => ({\n \"--angle\": \"215deg\",\n top: \"-5%\",\n left: `${Math.floor(Math.random() * 800) - 200}px`,\n animationDelay: `${(Math.random() * 0.9 + 0.2).toFixed(2)}s`,\n animationDuration: `${Math.floor(Math.random() * 8 + 4)}s`,\n }))\n setMeteorStyles(styles)\n }, [number])\n\n return (\n <>\n {meteorStyles.map((style, idx) => (\n \n ))}\n \n )\n}\n\nexport interface MeteorsCardProps extends React.HTMLAttributes {\n children?: React.ReactNode\n meteorCount?: number\n}\n\nexport function MeteorsCard({\n children,\n className,\n meteorCount = 20,\n ...props\n}: MeteorsCardProps) {\n return (\n \n \n
{children}
\n \n )\n}\n", "type": "registry:ui", "target": "components/pioneerui/meteors.tsx" } ], "type": "registry:ui" }