← Back to Writing

Frontend · 2026-06-14 · 7 min read

Zero-dependency motion: hitting 60fps on mobile without heavy animation libraries

The GPU-only rule

We animate four properties: transform, opacity, clip-path, and grid-template-rows. Everything else (width, height, top, left) triggers layout and will jank on mid-range phones. The capability rows on this page expand with a 0fr-to-1fr grid transition; the stacked cards drift with translate3d; the hero dots scale radius without touching layout.

This constraint is creative, not limiting. Nearly every interaction users describe as premium is a combination of fades, slides, and reveals with good easing.

Canvas without the framework tax

The hero dot-matrix is one canvas, one rAF loop, devicePixelRatio capped at 2. Cursor smoothing runs at 0.12 exponential smoothing; the idle wave is a single sine over time. Under prefers-reduced-motion the loop never starts: one static frame, drawn once.

No library did this better than 90 lines of canvas code. The dependency you skip is a dependency that can never break your build or bloat your bundle.

const s = 1 - smoothstep(0, R, dist); // radius swells, dots push away, connectors fade in r = base + (2.4 - base) * s; offset = 4 * s; // px along radial vector

Respect the motion budget

Micro-interactions get 200-250ms ease-out. Structural moves get the house curve cubic-bezier(0.22, 1, 0.36, 1) at 320-820ms. Anything longer needs a reason, and scroll-jacking never qualifies. Reduced-motion users get the end state instantly; content must never depend on animation to be readable.

Next essay → Architecture

The 4-week MVP blueprint: cutting scope without cutting architecture