Particles Highlight

PreviousNext

Interactive particle background and highlight effects with mouse tracking.

particle-highlight-default

Installation

pnpm dlx shadcn@latest add https://ui.dalim.in/r/styles/default/particle-highlight.json

Usage

import { ParticleCircle } from "@/components/ui/particle-circle"
<div className="relative h-screen w-full overflow-hidden">
  <ParticleCircle
    colors={["#9c88ff", "#7c3aed", "#a855f7", "#c084fc"]}
    particleSize={[1, 5]}
    particleCount={1500}
    size={400}
  />
  <div className="absolute inset-0 z-10 flex items-center justify-center">
    <p className="text-xl font-semibold">Content over particle circle</p>
  </div>
</div>

API Reference

ParticleCircle

A configurable animated particle circle component.

PropTypeDefaultDescription
particleCountnumberResponsive (1000 on small screens, 2000 on large)Number of particles to render.
shrinkDurationnumber8Duration (seconds) for shrinking phase.
growDurationnumber8Duration (seconds) for growing phase.
colorsstring[]["#393e46", "#00adb5", "#393e46", "#00adb5", "#e6eeef"]Array of particle colors.
baseRadiusnumber0.35Base radius multiplier relative to canvas size.
particleSize[number, number][2, 8]Range for particle size.
enableBlendModebooleantrue (disabled in Firefox)Whether to use SCREEN blend mode for vibrant colors.
sizenumberAuto (min(windowWidth, windowHeight))Custom width/height of the canvas.