Particles
Particles for adding visual flair to your website.
Particles
"use client"
import { useTheme } from "next-themes"
import { Particles } from "@/components/vritti/particles"
export function ParticlesExample() {
const { resolvedTheme } = useTheme()
const particleColor = resolvedTheme === "dark" ? "#ffffff" : "#000000"
return (
<div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl">
<span className="pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10">
Particles
</span>
<Particles
className="absolute inset-0"
quantity={100}
ease={80}
color={particleColor}
refresh
/>
</div>
)
}
Installation
pnpm dlx shadcn@latest add "https://vritti.thesatyajit.com/r/particles"