Building performant scroll animations
Keep scroll motion on the compositor—and test it on a phone that is not yours
Janky motion is worse than none. Users feel dropped frames before they notice your easing curve. The craft is knowing which properties stay on the GPU and how to schedule work.
Animate transform and opacity
Layout-affecting properties (width, height, top, margin) force style → layout → paint every frame. Transform and opacity can often stay on the compositor.
Same visual move, different cost: prefer translate over left.
Compositor-friendly vs layout thrash
Loading code…useScroll + useTransform
Motion’s scroll hooks give you normalized progress without hand-rolled listeners. Map that progress to the few properties that matter; do not animate everything “because we can.”
Element-scoped scroll mapping
Loading code…Viewport triggers via Intersection Observer
whileInView (Intersection Observer under the hood) beats scroll listeners for one-shot entrances. Use once: true, a negative margin to start early, and shared variants so parents stagger children without N timelines.
Staggered feature grid
Loading code…Batch and respect reduced motion
One parent stagger is cheaper than twenty independent timelines. Cap how many elements move at once—especially on mobile.
Honor prefers-reduced-motion. A static layout that still communicates beats a beautiful stutter.
Adaptive motion gate
Loading code…Profile on real devices
Your laptop lies. Record a scroll pass in Chrome Performance on a mid-range Android or throttled CPU. Red marks mean cut properties, cut count, or cut the effect.
Final thoughts
Performance is the product surface users feel first. Stay on transform/opacity, scope scroll work, batch entrances, and verify on hardware that matches your audience—not your workstation.
Motion cost ladder
From static baseline to spring — feel the difference
Loading code…Related Articles
Next.js vs WordPress for a marketing site in 2026
When WordPress is enough—and when a custom Next stack is the better business decision
Website SEO that actually moves leads (not just rankings)
Structure, speed, intent pages, and tracking—SEO as a growth system, not a checklist theater
Ready to build something this considered?