Web Design

Magnetic CTAs

Primary buttons that gently lean toward your cursor as it approaches, then spring back when it leaves — a subtle "pull" that makes the key actions feel alive on desktop.

Pointer EventsCSS VariablesMicro-interactionsTypeScript

Representative outcomes

DesktopFine-pointer only
0Layout shift
SafeReduced-motion

Typical results from comparable builds — actuals vary by business and traffic.

sentientsprite.github.io/portfolioOpen ↗

About this project

A tiny pointer-tracking layer that gives the most important buttons a magnetic feel. As a fine pointer nears a target, the button translates a few pixels toward the cursor via CSS custom properties (no layout reflow), eased with a springy curve, and releases on pointer-leave. It only activates for fine pointers (mouse/trackpad), stays completely off for touch, and disables itself under reduced-motion preferences. Applied to the hero and project CTAs. Try it live — slowly move your mouse toward any green button on this site.