A button that subtly responds under your finger, a panel that slides out from where you tapped, new rows easing into a list: animation like this barely gets noticed, but without it an interface feels unresponsive. A five-second intro, blocks that float in with every turn of the scroll wheel, and a background with a life of its own get noticed by everyone. And often they make people close the tab.
The difference isn't the designer's taste. It's whether the motion serves what the person is trying to do. Let's look at why web design needs animation, where it helps and where it gets in the way, how to protect speed and accessibility, and how to spec motion design so developers build exactly what was intended.
Why interfaces need animation
In an interface, motion does four useful jobs. If an animation does none of them, simplify it or remove it.
- Feedback. The user taps, and something happens. A button reacts to the press, a field lights up on an error, the cart icon confirms the item was added. Without feedback, people aren't sure the action worked and tap again.
- Connecting states. A menu slides out of the button that opened it, a card expands into details, a deleted row collapses instead of vanishing instantly. Motion explains where a new element came from and where the old one went.
- Attention. A notification appears, the order total changes, there's a form error below the visible area. A short movement shows where to look. But it only works while one thing on the page is moving.
- Brand character. The style of motion, whether sharp, soft or springy, is part of the visual language, like typography and color. It's a legitimate goal, but it comes last and shouldn't interfere with the first three.
Here's a good test: turn the animation off and walk through the main user flow. If it becomes unclear what's happening, the animation was useful. If nothing changes except a feeling that things got plainer, it was decoration, and its cost is worth weighing.
Micro-interactions vs. "wow" effects
Micro-interactions are small movements in response to actions: hover, tap, toggle, loading, error. They're short, repeat hundreds of times and are almost invisible. "Wow" effects are big scenes: an animated hero section, 3D objects, elaborate page transitions, scroll-driven storytelling. They're designed to be seen and remembered.
| Micro-interactions | "Wow" effects | |
|---|---|---|
| Purpose | Feedback and clarity | Impression and brand image |
| Where | Buttons, forms, menus, lists, cart | Hero section, promo, product showcase |
| How often seen | With every action | Once or twice per visit |
| Duration | Fractions of a second | Seconds |
| Page weight | Almost none, CSS is enough | Often libraries, video, WebGL |
| Risk | Low, if they're short | Slow loading, distraction, trouble on low-end phones |
On a commercial site, the usual balance is careful micro-interactions wherever there's an action, plus one or two showpiece moments where people are still getting to know the brand. In the catalog, the cart, the contact form and the customer account, "wow" gets in the way: people came to get something done, not to watch.
The more often someone sees an animation, the shorter and quieter it should be.
Scroll animation and parallax: where the risks are
Scroll animation is when blocks appear, slide in or change as you scroll. In moderate doses it helps: it marks the start of a new section and brings a long page to life. Problems start when every paragraph appears this way.
- Content isn't ready when people look for it. Someone scrolls quickly to the pricing, and it's still floating in. Or after jumping to an anchor, the block is empty until the animation fires.
- Scroll hijacking. The page takes over the wheel or swipe and decides where to go on its own. This breaks familiar controls, especially on trackpads and phones.
- Motion sickness. Parallax, with layers moving at different speeds, and large full-screen movements cause discomfort and dizziness in some people.
- Performance. Scroll handlers that recalculate something on every frame make scrolling choppy on weaker devices.
- Crawlers and screenshots. If content is hidden until a script fires and the script fails, nobody sees it.
The safe option is content visible by default, with animation only as decoration. The reveal fires once, it's short, with a small offset, and the text itself is in the markup and accessible without JavaScript. To track when elements enter the viewport, browsers offer IntersectionObserver, which doesn't load the page the way listening to every scroll event does.
Duration and easing
For interface transitions, the generally accepted benchmarks are in the range of a few hundred milliseconds. Feedback on hover and tap is made nearly instant, tens of milliseconds. Showing a tooltip, switching a tab or expanding an element takes roughly 150–300 ms. Larger movements, such as a full-screen panel, can take a little longer, but if people get bored waiting, the transition is too long.
A few rules that work almost every time:
- The longer the distance, the longer the motion, within reason: small elements move faster than large ones.
- The curve matters more than the duration. Linear motion looks mechanical. Entrances usually slow down toward the end (ease-out), exits speed up (ease-in).
- Exits are shorter than entrances. The person has already decided to close the element, so there's no reason to make them wait.
- Animation doesn't block actions. If a button can be pressed during a transition, the press should work.
- One system for the whole site. A set of durations and curves is defined as tokens, like colors and spacing, rather than picked anew for every button.
Animation and site speed
The browser renders a page in several steps: it calculates where elements go (layout), fills them in (paint) and assembles the layers (composite). If you animate width, height, margins or position via top and left, the browser recalculates the layout on every frame. On a powerful laptop you won't notice; on a budget phone you'll see stutter.
So the rule is simple: animate transform and opacity, not layout. The browser usually handles translation, scaling, rotation and opacity at the compositing stage, without recalculating the page. Expanding a block by height can also be done with transform, or carefully limited to a single element.
Video, Lottie and heavy libraries
A background video in the hero section is a common cause of slow loading. If you really need it, compress it, add a poster image, and skip it on mobile or load it after the main content. Lottie and similar formats are convenient for designers, but both the animation file and the player add weight, and complex scenes tax the CPU. Animation libraries are worth adding when you can't do without them, not for a couple of reveals that CSS can handle.
Core Web Vitals: CLS and INP
Animation affects the metrics Google uses to assess user experience, and you can measure it. CLS (Cumulative Layout Shift) counts unexpected content shifts. If a block changes size as it appears and pushes its neighbors, that shift goes into the metric; movement via transform doesn't count as a layout shift. INP (Interaction to Next Paint) shows how quickly the page responds to an action. Heavy animation scripts that hog the main thread delay the response to a click.
Accessibility: prefers-reduced-motion, flashing, autoplay
iOS, Android, Windows and macOS all have a "reduce motion" setting. It's used by people who get motion sick from animation, who get headaches, or who find movement makes it hard to focus. The browser passes this setting to the site through the prefers-reduced-motion media query, and the site should respect it: remove parallax, scroll reveals and large transitions, and keep instant state changes or a gentle opacity fade.
That's how our own site works: blog post headlines appear word by word, but when "reduce motion" is on, the effect is turned off and the headline is visible in full right away. It's a few lines of CSS, not a separate version of the site.
- Flashing. WCAG prohibits flashes more than three times per second: for people with photosensitive epilepsy, they can trigger a seizure. Flickering banners and abruptly changing backgrounds are off the table.
- Autoplay. If something moves on its own for more than five seconds, such as a carousel, a ticker or a video, WCAG requires a way to pause or hide it.
- Focus and screen readers. Animated menus and modals must move keyboard focus correctly, and content hidden by animation shouldn't stay available to screen readers while it isn't visible.
Animation on mobile devices
The phone is the most demanding place for animation. Processors are weaker than laptops', the battery drains, the connection is unstable, and the screen is small, so a large movement takes it over entirely. What looks smooth in a Figma prototype can stutter on a budget Android.
Mobile has no hover, so hover effects are useless there: feedback has to come on tap. Gestures, such as swiping or dragging a panel, should move the element with the finger, without delay, and the animation after release continues that motion rather than starting a new one. Parallax and heavy scenes are often simplified or switched off entirely on phones.
How to spec animation for development
"The block slides in nicely" means something different to everyone. For the result to match the intent, animation is handed off to development as precisely as spacing and colors.
- Prototype or video. Show the motion: a clickable Figma prototype, a clip or a screen recording. You can't describe smoothness in words.
- Trigger. What starts the animation: hover, tap, entering the viewport, data loading, an error.
- Properties and values. What changes and from what to what: opacity from 0 to 1, a 16 px offset, scale from 0.96 to 1.
- Duration, delay and easing. Specific values in milliseconds and the name of the curve or its parameters. Better yet, a reference to a design system token.
- Reduced-motion behavior. What remains when the user asks for less motion: nothing, opacity only, or an instant change.
- Acceptance on a device. Testing on a real mid-range phone, not just on a work laptop.
We build animations into the design system from the start, alongside the components, and test them in the actual build, not just in mockups. As a web design and development agency, we've collected examples of sites we designed and built on our work page.
Common mistakes and a checklist
Other mistakes we see most often:
- animating width, height and margins, which stutters and pushes neighboring content;
- content hidden until a scroll script fires;
- scroll hijacking and "sticky" full-screen sections on a long page;
- different durations and curves in every block, with no shared system;
- ignoring the "reduce motion" setting;
- carousels that advance on their own and can't be stopped.
Before launch, run through a short list:
- every animation has a purpose: feedback, connecting states, attention or brand character;
- micro-interactions are short, and big effects appear in only one or two places;
- content is visible without the animation and without JavaScript;
- only transform and opacity are animated, with no stutter on a low-end phone;
- animations don't worsen CLS and INP in PageSpeed Insights;
- with prefers-reduced-motion, motion is removed or replaced by a gentle change;
- nothing flashes more than three times per second, and autoplay can be paused;
- durations and curves are defined as tokens in the design system.
FAQ
Does animation affect SEO?
Not directly, but indirectly, yes. Heavy animations slow down loading and hurt Core Web Vitals, and content that stays hidden until a script fires may not get indexed. Lightweight CSS animations on content that is visible by default have no effect on SEO.
What is prefers-reduced-motion?
It's a CSS media query that tells the site the user has turned on the "reduce motion" setting in their operating system. The site uses it to turn off or simplify animations: removing parallax, scroll-triggered reveals and large transitions.
How long should a website animation last?
For interface transitions, the generally accepted benchmark is a few hundred milliseconds: feedback on a tap is almost instant, while expanding and revealing elements takes roughly 150–300 ms. If you have to wait for an animation, it's too long.
Do we need a separate library for animation?
For most micro-interactions and reveals, CSS is enough. Libraries are justified for complex scenes, chained sequences and multi-step scroll animations, but every one of them adds weight to the page.




