Summer pricing is live: save $50 on Starwind Pro lifetime access.

Effect 12 - Mouse Repel Particles

Pro

An interactive particle effect where particles are pushed away from the mouse cursor and smoothly snap back.

Theme

Upgrade to Pro

Mouse Repel Particles

An interactive particle effect that responds to your cursor. Particles are pushed away in a ring and smoothly snap back when the mouse moves away.

Move your mouse around to see the particles react

Loading code...

Starwind Dependencies

Sign in to view code and copy install commands.

Sign in

This component requires Starwind Pro.

Get lifetime access to all premium components, updates, and priority support.

Upgrade to Pro

Failed to load code. Please try again.

Code

Usage
<Effect12
  particle-color="currentColor"
  repel-radius={150}
  repel-strength={1}
  snap-back-duration={300}
/>

Props

proptypedefaultdescription
particleCountnumber80Number of particles generated during render.
minSizenumber3Minimum generated particle size in pixels.
maxSizenumber8Maximum generated particle size in pixels.
particleColorstring"currentColor"CSS color value used by the particles.
minOpacitynumber0.2Minimum generated particle opacity.
maxOpacitynumber0.7Maximum generated particle opacity.
repelRadiusnumber150Mouse repel radius in pixels.
repelStrengthnumber1Multiplier for the particle repel force.
snapBackDurationnumber300Duration of the snap-back transition in milliseconds.