Particles

Dynamic 3D particle system with customizable properties

Installation

npx shadcn@latest add https://scrollx-ui.vercel.app/registry/particles.json 

Usage

import { Particles } from "@/components/ui/particles";
<div className="relative bg-black w-full h-[400px]">
  <Particles
    color="#fffff"
    particleCount={25000}
    particleSize={5}
    animate={false}
    className="z-0"
  />
</div>

API Reference

Particles

Interactive particle visualization with mouse-responsive movement

Props

PropertyTypeDefaultDescription
colorstring"#ff3366"
Base color of the particles (HEX).
particleCountnumber10000
Total number of particles rendered.
particleSizenumber35
Size of each individual particle.
animatebooleantrue
Whether particles animate color transitions.
classNamestring""
Optional class for the outer container.

Type Notes : The included type declaration file is only necessary if using Stats.js performance monitoring. For basic particle functionality without performance stats, you can omit the type file.

Built withby Ahdeetai.