Back to library
INTERACTION_012

Custom Cursor.

A precise dot follows the pointer at full speed while a ring lerps behind it. Hovering interactive elements expands the ring and can swap in a label like VIEW or COPY.

CATEGORY
Mouse
COMPLEXITY
Advanced
TECH
CSS + JS
PLATFORM
Desktop
PERFORMANCE
Medium
LIVE PLAYGROUND
MOVE INSIDE
JavaScript / JS
let mx = 0, my = 0, rx = 0, ry = 0;

addEventListener("pointermove", (e) => { mx = e.clientX; my = e.clientY; });

(function loop() {
  rx += (mx - rx) * 0.15;
  ry += (my - ry) * 0.15;
  dot.style.transform = `translate3d(${mx}px, ${my}px, 0)`;
  ring.style.transform = `translate3d(${rx}px, ${ry}px, 0)`;
  requestAnimationFrame(loop);
})();

IF YOU LIKE THIS, STEAL THESE TOO.

AMBIENT LIGHT
INTERACTION_013CSS + JS

Mouse Glow

Large ambient light that trails the pointer across a section.

Mouse / MediumView
INTERACTION_003CSS + JS

Magnetic Button

Subtle cursor-following CTA interaction.

Buttons / LightView
DISTORT
Desktop only
INTERACTION_145CSS + JS

Cursor Text Distortion

Type bends slightly toward the pointer as it passes.

Mouse / LightView
INTERACTION_014CSS + JS

Cursor Parallax

Layers drift at different depths as the pointer moves.

Mouse / LightView