Meteors
- Source
- Magic UI ↗
- Author
- Magic UI
- Licence
- MIT
Loading…
Meteors with fading tails streak diagonally across the frame.
Code
"use client";
import { Meteors } from "@/lab/magicui/ui/meteors";
export default function MeteorDemo() {
return (
<div className="@container relative flex h-full w-full flex-col items-center justify-center overflow-hidden">
<Meteors number={30} />
<span className="pointer-events-none bg-linear-to-b from-black to-gray-300/80 bg-clip-text text-center text-[clamp(3rem,12cqw,6rem)] leading-none font-semibold whitespace-pre-wrap text-transparent dark:from-white dark:to-slate-900/10">
Meteors
</span>
</div>
);
}
Prompt
Build "Meteors", a background animation. What it does: Meteors with fading tails streak diagonally across the frame. Write it as a single self-contained React component in TypeScript that fills its parent (w-full h-full), styled with Tailwind CSS. It sits on a light background, in a 16:10 frame. Respect prefers-reduced-motion with a still state, pause work when the element is off screen, and keep it accessible. Original: https://magicui.design/docs/components/meteors (Magic UI, MIT).