3D & WebGL websites

Website Animation: Types, Tools and Performance Without Compromise

Website Animation: Types, Tools and Performance Without Compromise

Website animation helps when it explains something: what changed after a click, where a panel came from, what matters most on the screen, and that the page is responding to you. It hurts when it delays content, shifts the layout or fills the screen with motion that has no job. Pick the tool by the task: CSS for transitions and micro-interactions, native scroll-driven animations or GSAP for scroll effects, Lottie for illustrations and WebGL for 3D scenes. Whatever the tool, animate transform and opacity, and switch animation off or simplify it for people who have asked their device to reduce motion.

What is animation on a website for?

Motion in an interface isn’t decoration. Done well, it plays one of four roles:

  • Feedback. A button responds to a click, a form field flags an error, the basket shows the product has gone in.
  • Continuity. The menu slides out from where you clicked, and a card expands into its detail view instead of swapping the screen. Users understand where they are and how to get back.
  • Hierarchy. Movement draws the eye harder than colour. One animated thing on screen points to what matters; five at once is noise.
  • Brand character. Timing, easing curves and the way elements arrive can be as recognisable as a logo. A good starting point is often a logo animation, from which I derive the motion system for the whole site.

If an animation plays none of these roles, you can usually delete it with no loss, and the page gets faster.

Types of website animation

Type Example Typical technique
Micro-interactions Hover, button press, toggle, field validation CSS transitions
UI state transitions Menu, accordion, modal, tabs CSS transitions, Web Animations API, View Transitions API
Scroll-triggered reveals Sections and cards that animate in as they enter the viewport CSS scroll-driven animations, Intersection Observer, GSAP ScrollTrigger
Scrollytelling A pinned section where scrolling drives a sequence of steps GSAP ScrollTrigger, CSS scroll-driven animations
Animated illustrations and icons A service icon, a process illustration, a loader Lottie, dotLottie, animated SVG
Background video and loops A short product loop in the hero Muted MP4 or WebM
3D graphics A product model, an interactive background scene WebGL (Three.js, React Three Fiber)
Page-to-page transitions A thumbnail morphs into the header of the next page View Transitions API

On our projects, micro-interactions usually run 150–300 ms and larger transitions up to about half a second. Any longer and interface animation starts to feel like waiting.

CSS, Lottie, GSAP or WebGL: which should you use?

Every tool has a cost: in kilobytes, in CPU and GPU work, and in build time. Pick the lightest one that does the job.

Technique Best for Strengths Limitations
CSS transitions and animations Hover, button states, simple reveals No library; browsers optimise transform and opacity Long, interdependent sequences get hard to manage
CSS scroll-driven animations Reading progress bars, section reveals, simple parallax Can run off the main thread, no JavaScript Cross-engine support only since October 2026; older browsers need a static fallback
GSAP (with ScrollTrigger, SplitText) Complex timelines, pinned sections, text animation Precise control, predictable cross-browser behaviour, the whole library is free One more script to download; dozens of triggers can strain a phone
Lottie and dotLottie Illustrations, icons, animation from After Effects Vectors stay sharp at any resolution; files are usually lighter than video Needs a JavaScript player; complex effects are better exported as video
Video (MP4, WebM) Photoreal footage, effects that vectors can’t do Any visual complexity File weight, no interactivity
WebGL (Three.js) 3D models, shaders, interactive scenes Effects you can’t get any other way The highest performance cost; needs a plan for low-end devices

Two recent changes have shifted these choices. First, since version 3.13 GSAP has been entirely free, including the formerly paid plugins, after Webflow took the project over (GSAP 3.13). Second, scroll-linked animation has arrived in CSS: Chrome shipped it in version 115, Safari in 26.0, and Firefox 159 turned it on by default on 27 October 2026, which web.dev describes as Baseline Newly available. Chrome points out that these animations can run off the main thread, unlike classic JavaScript scroll listeners.

Lottie is a JSON-based format for vector animation, usually exported from After Effects, and since 2024 it has had an official specification from the Lottie Animation Community at the Linux Foundation. Its packaged variant, dotLottie, is a ZIP archive holding one or more animations and their assets; LottieFiles says such files are typically 2–10 times smaller than the JSON (LottieFiles).

Animation, performance and Core Web Vitals

Animation affects all three Core Web Vitals, often in ways you won’t notice on a designer’s fast laptop.

CLS: animate transforms, not layout

web.dev’s guide to high-performance CSS animation recommends restricting animation to transform and opacity, because they don’t force the browser to recalculate layout or repaint. According to web.dev, animating transform doesn’t cause layout shifts, while changing top, left, width or height does. HTTP Archive data summarised in web.dev’s round-up shows that pages animating layout-affecting properties are 15% less likely to have good CLS, and pages animating margins or borders have poor CLS at almost twice the overall rate.

LCP: don’t hide the headline behind an entrance animation

The popular effect where the hero headline fades in only after a script loads has a hidden cost. Elements with opacity: 0 aren’t considered LCP candidates, and an element only counts once it is visible to the user (web.dev). If the headline waits for JavaScript, so does the measurement. The key content of the first screen should be visible from the first render; animation can at most refine it.

INP: keep the main thread free

JavaScript scroll listeners, dozens of triggers and heavy per-frame calculations all occupy the browser’s main thread. A click during that time waits in the queue, and INP suffers. Move what you can into CSS, load animation libraries only on pages that use them, and reach for will-change sparingly, only when measurement shows a problem, as web.dev advises. Lighthouse catches some of these issues in its “Avoid non-composited animations” audit.

We cover the full measurement and fix plan in our guide to Core Web Vitals and site speed.

Accessibility: prefers-reduced-motion and WCAG

For some people, motion on screen isn’t a matter of taste. MDN notes that scaling and panning large objects can trigger discomfort for people with vestibular motion disorders (MDN). Users can turn on reduced motion in their system’s accessibility settings (Windows, macOS, iOS, Android), and your site reads it through the prefers-reduced-motion media query, which has worked across all major browsers since January 2020.

Requirement Level What it means in practice
WCAG 2.2.2 Pause, Stop, Hide A Motion that starts automatically, lasts more than five seconds and sits alongside other content must be pausable or hideable (W3C)
WCAG 2.3.1 Three Flashes or Below Threshold A Nothing on the page may flash more than three times per second unless the flash is below the thresholds (W3C)
WCAG 2.3.3 Animation from Interactions AAA Motion triggered by interaction, such as scroll parallax, should be possible to disable unless it’s essential (W3C)

Reduced motion doesn’t mean a lifeless page. Under prefers-reduced-motion: reduce I swap slides and scaling for a short cross-fade, switch off parallax, autoplaying loops and smooth scrolling, and keep the feedback without which the interface would be harder to read. For online shops in the EU, accessibility is also a legal matter. The European Accessibility Act has applied to e-commerce services since 28 June 2025, which in Poland took the form of the Polish Accessibility Act, with micro-enterprises exempt (gov.pl).

Scroll animation: when does it help, and when does it wear people out?

Scroll-driven animation is the most powerful and most overused tool on business websites.

When it helps

  • It shows progress: a reading bar, the current step in a process.
  • It breaks a complex process into stages that appear at the reader’s pace.
  • It presents a product from several angles while a pinned image changes alongside the copy.

When it wears people out

  • Scroll-jacking. The page scrolls differently from how the user moved the wheel or finger. It frustrates fast, especially on trackpads.
  • Pinned sections that go on forever. Three screens of scrolling to see one animation is too much.
  • Content that arrives too late. Someone scrolling quickly to the pricing sees a blank page because sections are still sliding in.
  • An effect on every section. When everything moves, nothing stands out.

By default I start with CSS scroll-driven animations wrapped in an @supports rule. A browser without support then shows fully visible, static content rather than an empty screen. I add GSAP where a complex timeline or pinned section is needed.

How we design motion for a website, step by step

  1. A job for every animation. We write down what each animation is meant to communicate. If it can’t be said in one sentence, it goes.
  2. A motion system. Two or three durations, one or two easing curves, agreed directions for entrances and exits. That way the site moves as one, not as a collection of effects from different libraries.
  3. Prototype. I test key transitions in Figma or After Effects before any code is written. A change in a prototype costs less than in a finished component.
  4. Performance budget. We agree how much JavaScript and which animation files can ship, and what loads only after interaction.
  5. Testing. A mid-range Android phone, reduced motion switched on, keyboard-only navigation.
  6. Measuring after launch. Core Web Vitals field data in Search Console shows whether the animation is hurting real users.

When does animation become a 3D website?

The line sits where motion stops being a layer on top of the interface and becomes the main experience: a product model the user rotates, a scene that reacts to the cursor, a configurator. That’s when WebGL comes in, with a different set of requirements: compressed models, rendering only when something changes, a fallback for weaker devices and content that search engines can read in the HTML. We go deeper in our article on 3D websites built with WebGL.

Common animation mistakes on business websites

  • A preloader in front of the content. An animated loading screen that holds visitors for a few seconds is pure loss. If a site needs a preloader, the problem is its weight, not a lack of animation.
  • A carousel that advances on its own. Auto-rotating hero slides rarely get read, and without a pause button they fail WCAG 2.2.2.
  • Every element enters differently. One heading from the left, another from below, a third spinning in. Without a motion system it looks accidental rather than designed.
  • Hover as the only way to reveal information. Phones have no hover, so content hidden behind it simply doesn’t exist for a large share of visitors.
  • A library loaded on every page. GSAP with several plugins, or a Lottie player needed for one home-page section, shouldn’t weigh down the blog and the contact page.
  • Testing only on a fast laptop. An animation that’s smooth on a MacBook can drop frames on a cheaper phone, and that’s where most visits happen.

Who designs website animation at OrbitBuilder?

I do. I’m Olaf Klimasz, and at OrbitBuilder I own front-end and motion design. In code I mostly work with CSS and GSAP, and I build Lottie and video animation in After Effects. I also run Olaf Motion, my own motion design studio, where I share After Effects templates and tools.

Want a site that moves with purpose and still loads fast? See how we build 3D and animated WebGL websites, or get in touch. We’ll start with a list of the places where motion should explain something.

Frequently asked questions

Does animation slow down a website?

It can, but it doesn’t have to. Animations built on transform and opacity are cheap for the browser, and native CSS scroll-driven animations can run off the main thread. The trouble comes from heavy libraries loaded on every page, animating layout properties and headlines hidden until a script loads.

Should I use CSS, GSAP or Lottie for website animation?

Use CSS for micro-interactions, transitions and simple scroll effects. Use GSAP for complex sequences, pinned sections and text animation. Use Lottie for animated illustrations and icons made in After Effects. Reach for WebGL only when you need real 3D.

Is GSAP free?

Yes. Since version 3.13 the entire GSAP library, including formerly paid plugins such as SplitText and MorphSVG, is available for free in the public package. The change followed Webflow’s takeover of the project in 2025.

What is prefers-reduced-motion?

It’s a CSS media query that tells your site the user has turned on reduced motion in their operating system. The site should then replace slides and scaling with simple fades or switch off non-essential animation. It has worked in all major browsers since 2020.

Is scroll animation bad for SEO?

Not in itself, as long as the content is in the HTML from the start and animation only changes how it looks. The risk is indirect: hidden content can delay LCP, motion can shift the layout and hurt CLS, and heavy JavaScript can worsen INP. That’s why the key first-screen content should be visible straight away.

How long should a UI animation last?

On our projects, micro-interactions such as a button response usually run 150–300 ms, and larger transitions such as opening a panel up to about half a second. Anything longer starts to feel like waiting. Decorative animation can run longer, but it shouldn’t block content.

Sources

  1. web.dev – How to create high-performance CSS animations
  2. web.dev – Cumulative Layout Shift (CLS)
  3. web.dev – The most effective ways to improve Core Web Vitals
  4. web.dev – Largest Contentful Paint (LCP)
  5. Chrome for Developers – Avoid non-composited animations
  6. Chrome for Developers – Animate elements on scroll with scroll-driven animations
  7. WebKit – WebKit Features in Safari 26.0
  8. MDN – Firefox 159 release notes for developers (27 October 2026)
  9. web.dev – New to the web platform in October 2026
  10. MDN – prefers-reduced-motion
  11. MDN – View Transition API
  12. W3C – Understanding WCAG 2.2 SC 2.2.2: Pause, Stop, Hide
  13. W3C – Understanding WCAG 2.2 SC 2.3.1: Three Flashes or Below Threshold
  14. W3C – Understanding WCAG 2.2 SC 2.3.3: Animation from Interactions
  15. GSAP – GSAP 3.13 release (bonus plugins now public)
  16. Webflow – Webflow makes GSAP 100% free
  17. LottieFiles – dotLottie
  18. Linux Foundation – Lottie Animation Community announces Lottie v1.0 specification (17 September 2024)
  19. gov.pl – Polski Akt o Dostępności: usługi handlu elektronicznego
  20. OlafMotion – studio motion designu Olafa Klimasza

Need help with this?

A website people remember. We blend Three.js, shaders and scroll-driven animation with content Google and AI can read without friction.