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.

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
particleCount number 80 Number of particles generated during render.
minSize number 3 Minimum generated particle size in pixels.
maxSize number 8 Maximum generated particle size in pixels.
particleColor string "currentColor" CSS color value used by the particles.
minOpacity number 0.2 Minimum generated particle opacity.
maxOpacity number 0.7 Maximum generated particle opacity.
repelRadius number 150 Mouse repel radius in pixels.
repelStrength number 1 Multiplier for the particle repel force.
snapBackDuration number 300 Duration of the snap-back transition in milliseconds.