Back to Components

Particles

A highly customizable interactive particle background, featuring smooth fluid animations, real-time mouse reactivity, and a sleek modern motion feel.

Preview

Particles

Installation

Install the component using the CLI.

$npx shadcn@latest add https://ankurz.me/r/particles.json

Usage

Import the component:

import { Particles } from "@/components/particles"

Use it in your code:

<Particles
  className="absolute inset-0"
  quantity={100}
  ease={80}
  color="#ffffff"
  refresh
/>

Props

PropertyTypeDefaultDescription
classNamestring""Additional CSS classes.
quantitynumber100Number of particles.
staticitynumber50Resistance to mouse movement. Higher = less reactive.
easenumber50Smoothing of particle movement.
refreshbooleanfalseWhether to refresh particles on re-render.