GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

04Magnet particles

The cursor becomes a magnet that pushes and pulls iron filings. Force falls off with the square of the distance, and every frame moves through translate so the swarm stays crisp.

Best forHero section backdrop, a nav highlight that crowds around the cursor

requestAnimationFramepointermovetranslate
Magnet particles
Open in a new tab

04 Magnet particles — Measured area 18.77% · moving frames 23/23Original by GODRICH · SCSS and React ship in the zip · JavaScript Physics Simulation: 9 Demos, No Library

The post this demo lives in

JavaScript Physics Simulation: 9 Demos, No Library - preview of all 9 demosJavaScript Physics Simulation: 9 Demos, No LibraryA JavaScript physics simulation is arithmetic repeated once per frame: force adds to velocity, velocity adds to position See all demos in this post

If you like this effect - similar demos