Websites
Creative website animations without compromising performance
Motion can make a website feel polished and memorable. Done carelessly, it makes pages slow and frustrating. A few principles keep both beauty and speed.
Thoughtful animation can make a website feel crafted: a headline that settles into place, an image that reveals itself as you scroll, a card that responds to your pointer. But motion has a cost. Heavy animation libraries, effects that run on every scroll event and large video backgrounds can make a beautiful page slow, especially on mid-range phones.
The good news is that most of the effects people admire can be built lightly. These are the principles we follow.
Give every animation a job
Before adding motion, ask what it is for. Good animation guides attention, explains a change, gives feedback or reveals content in a meaningful order. If an effect does none of these, it is decoration, and decoration is the first thing to cut when a page feels busy or slow.
Animate the cheap properties
Browsers can animate transform and opacity very efficiently, because they don’t force the page to recalculate its layout. Animating width, height, top or margin is far more expensive. Most slides, fades, scales and reveals can be built with transforms, opacity and clip paths.
Prefer CSS and browser-native tools
CSS transitions and keyframes cover a large share of interface motion with no extra JavaScript. For scroll-triggered effects, the browser’s IntersectionObserver can tell you when an element enters the screen without running code on every scroll. Reach for a large animation library only when the design genuinely needs it, and load it only on the pages that use it.
Keep scroll effects light
Scroll-linked effects such as parallax are where performance problems usually appear. Keep the work done per frame small, batch updates with requestAnimationFrame, use passive scroll listeners, and avoid taking control of scrolling away from the visitor.
Protect the first view
Animations should never delay content. The main heading and key message should be readable immediately, even if they also animate in. Reserve space for images so content doesn’t jump as they load, and lazy-load media that appears further down the page.
Respect reduced motion
Some people experience discomfort from on-screen motion and ask their device to reduce it. Websites can detect this preference with the prefers-reduced-motion media query. Respecting it means showing content in its final state and removing non-essential movement, without hiding anything.
Test on real devices
An animation that is smooth on a powerful laptop may stutter on an average phone. Test on the devices your visitors actually use, and measure performance as part of development rather than at the end.
We design and build websites that use motion purposefully. Our website design and development page is itself an example of this approach.