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

06Pointer-tracking strike — the path redrawn toward the cursor

Re-splitting the segment from a fixed origin to the pointer's coordinates with fresh displacement every frame makes the bolt feel like it chases and grips the cursor as it moves.

Best forA mouse trail on an interactive hero, a badge hover effect

pointermovelineTorequestAnimationFrame
Pointer-tracking strike — the path redrawn toward the cursor
Open in a new tab

06 Pointer-tracking strike — the path redrawn toward the cursor — Measured area 31.824% · moving frames 23/23Original by GODRICH · SCSS and React ship in the zip · 9 Lightning Effect Background Scenes, No WebGL

The post this demo lives in

9 Lightning Effect Background Scenes, No WebGL - preview of all 9 demos9 Lightning Effect Background Scenes, No WebGLNo library, no WebGL — a single recursive midpoint-displacement split makes lightning branches fork on their own, and th See all demos in this post

If you like this effect - similar demos