Components
An interactive 3D spiral galaxy of shader-rendered particles you can drag to rotate, scroll to zoom, and customize with color, glow, and density controls.
Loading preview...
import { ParticleGalaxy } from "@/components/ui/particle-galaxy";
export default function ParticleGalaxyDemo() {
return (
<div className="flex min-h-[520px] w-full items-center justify-center bg-background p-6">
<div className="relative h-[460px] w-full max-w-2xl overflow-hidden rounded-xl border bg-[#05060f]">
<ParticleGalaxy
className="absolute inset-0"
particleCount={12000}
colors={["#4f46e5", "#8b5cf6", "#ec4899"]}
glow={65}
/>
<div className="pointer-events-none absolute inset-x-0 bottom-0 p-6 text-center">
<p className="text-sm font-medium text-white/80">
Drag to rotate · Scroll to zoom
</p>
</div>
</div>
</div>
);
}