Skip to content

Web Animation in 2026 - CSS vs GSAP, When to Use Each

CSS handles 80% of web animation in 2026, GSAP wins for timeline choreography. Performance benchmarks, decision tree, View Timeline status.

· · 14 min read

Updated: October 28, 2026

Long-exposure light trails of fire against darkness

For years GSAP carried a "paid" reputation. The core library was always free for most uses, but the bonus plugins and certain commercial cases sat behind GreenSock's paid Club membership. That changed after Webflow acquired GSAP in the fall of 2024: on April 30, 2025 the whole library, every bonus plugin included, became free for everyone under GSAP's own no-charge license (a custom GreenSock license, not MIT). That shift changed how teams pick animation tech. The "GSAP is paid" mental model that ranked on Google for a decade is now wrong, and most "CSS vs GSAP" articles you'll find on page one haven't caught up.

The verdicts depend less on which library is "better" and more on which problem you're actually solving. Here's the honest framework, with mid-tier mobile guidance and a decision tree at the end.

TL;DR: CSS handles roughly 80% of UI animation needs in 2026 with zero bundle cost and native browser optimization. Reach for GSAP (currently version 3.15) when you need timeline sequencing, complex scroll choreography, or runtime control. The View Timeline API (Chrome 115+, Safari 26+) closes the scroll-driven gap for simple cases. Benchmark on real devices, not desktop Chrome.

Photo by Markus Spiske on Unsplash

Is CSS Animation Better Than GSAP in 2026?

For 80% of UI work, CSS is the right default. The Web Almanac has tracked how the large majority of mobile pages already use at least one CSS transition, while only a small minority load a JavaScript animation library. That gap exists because CSS transitions and @keyframes ship with the browser, run on the compositor thread, and don't add a single byte to your bundle. What they can't do is carry speed across a reversal: interrupted transitions restart from rest.

CSS handles about 80 percent of UI animation in 2026, with zero bundle cost.

The capabilities that CSS handles cleanly cover most production UI:

  • Hover states and focus rings (transition with cubic-bezier easing)
  • Loading indicators (keyframes with infinite iteration)
  • Entrance animations triggered by class changes
  • Page transitions via the View Transitions API
  • Simple scroll-driven effects via the View Timeline API

What CSS can't handle is anything requiring coordination across multiple elements with shared timing, anything that needs runtime control after the animation starts, or anything where the easing curve needs to be more complex than a single cubic-bezier expression. Exits used to sit on that list too. With @starting-style and transition-behavior: allow-discrete, a display: none exit plays in Chrome and Safari and sits behind a pref in Firefox, as laid out in animating display: none and height: auto.

There's a myth that "CSS is GPU-accelerated, therefore always faster." That isn't quite right. CSS transforms and opacity are GPU-accelerated. CSS width, height, margin, and top/left are not, and animating them triggers layout recalculation on every frame. A CSS animation that animates the wrong property will perform worse than a JavaScript animation that animates the right one. The property matters more than the language.

The honest take: if you can express the animation in CSS without contortions, ship CSS. If you find yourself nesting setTimeouts or chaining .addEventListener('transitionend') to fake a timeline, you've hit the wall.

What Can GSAP Do That CSS Cannot?

GSAP wins three concrete areas that CSS can't reach cleanly. The GSAP documentation makes the technical case, but in practice the differentiators are: timeline sequencing with labels and relative offsets, ScrollTrigger choreography with pinning and scrub mapping, and runtime modification (pause, reverse, time-warp, kill) of running animations. The core file is roughly 71KB minified, which comes to about 27KB gzipped in version 3.15.

Here's how the major animation features map across the three real options most teams consider:

FeatureCSSMotion (2.3-17KB)GSAP (~27KB core, gzipped)
Single-element transitionsFullFullFull
Keyframe animationsFullFullFull
Timeline sequencing with labelsNonePartialFull
Nested timelinesNoneNoneFull
Runtime control (pause, reverse, seek)PartialFullFull
Scroll-driven progressFull (View Timeline)PartialFull (ScrollTrigger)
Scroll pinningNoneNoneFull
Path-based motion (along SVG)NoneNoneFull (MotionPath)
Custom easing beyond cubic-bezierNonePartialFull (CustomEase)
FLIP layout animationsNoneFullFull (Flip plugin)

The features where GSAP stands alone are timeline labels for non-linear sequencing, scroll pinning, MotionPath, and CustomEase. If your animation needs any of those, you're in GSAP territory. If it doesn't, you have lighter options.

The plugin ecosystem (MotionPath, Flip, Draggable, MorphSVG, SplitText, ScrambleText) is also a real differentiator. Every one of those plugins became free on April 30, 2025, after the Webflow acquisition, which removed the historical "GSAP is paid for commercial work" objection that gated adoption at a lot of agencies.

A realistic scenario: coordinating four sections that pin in sequence with shared scroll progress is where a pure CSS View Timeline setup gets awkward, and where GSAP's ScrollTrigger timelines stay short. The price is the library's gzipped bundle weight, and for a site built around that choreography, it's the right tradeoff.

Photo by Geronimo Giqueaux on Unsplash

Does CSS or GSAP Perform Better on Mid-Tier Mobile?

On a mid-tier Android phone, simple transforms perform about the same across CSS, Motion, and GSAP. All of them can hold 60 fps without breaking a sweat, because the compositor does the work. The gap opens on complex scroll-linked animations, where pinning, scrubbing, and concurrent property updates expose the per-frame work each approach is doing.

The pinned scenario is where the architecture matters. View Timeline drives properties declaratively per scroll-progress, and on a mid-tier Android the browser can start dropping frames when many non-compositor properties update concurrently. GSAP batches its scroll calculations and uses gsap.ticker to align with rAF, which tends to hold the frame budget more predictably under the same load.

Two important caveats. First, "GSAP is faster" only applies to the heavy scenario. For an entrance stagger of transform and opacity, both options are indistinguishable, and reaching for GSAP for a hover transition is overkill. Second, a fast desktop laptop hides these gaps. If you benchmark only there, you'll conclude there's no difference, and you'll be wrong for half your users.

Run your own check: record a Performance trace in Chrome DevTools on a real mid-tier device, such as a Pixel 6a or an A-series Samsung, for each scenario you actually ship. Benchmark on what your audience actually uses.

For the broader context of how motion choices affect the user experience, see motion design for web guide, which covers when motion helps and when it gets in the way. Animation performance in React specifically is worth looking at alongside these benchmarks: the React Compiler practical guide on Coding Dunia explains how auto-memoization at build time reduces wasted re-renders that can undermine frame budgets when GSAP or CSS animations are running concurrently with state updates.

Is the View Timeline API Production-Ready in 2026?

Yes for progressive enhancement, no for sole reliance. The current Scroll-Driven Animations support on Can I Use puts the View Timeline API at around 87.8% global support (StatCounter data for September 2026). Chrome shipped it in version 115, Edge in 115, and Safari in 26.0, and Firefox followed with version 159 on October 27, 2026. That figure predates the Firefox release, so expect it to creep up as people update. The flackr/scroll-timeline polyfill fills the gap for older browsers, but it isn't small. The full build of version 1.1.0 is about 61KB minified, roughly 17KB gzipped, and it was last published in May 2024.

The properties you'll actually use are:

  • view-timeline (declares an element as a scroll-progress source)
  • animation-timeline (binds an animation to a named timeline)
  • animation-range (defines the start and end progress points)

A typical use case is a hero image that scales from 1.0 to 1.2 as it scrolls into view. In CSS, that's about eight lines. In GSAP ScrollTrigger, it's about 12 lines plus the GSAP runtime cost. For that effect, View Timeline wins on bundle.

The boundary is sharp: View Timeline can drive any animatable CSS property based on scroll position. It cannot pin an element. It cannot snap scroll behavior, that's a different spec (CSS Scroll Snap). It cannot trigger callbacks at specific scroll points, that requires JavaScript. If your design needs pinning or callbacks, you're back to ScrollTrigger.

One caveat on reach: Safari only gained view-timeline support in version 26, so a meaningful share of iOS visitors on older releases won't get the effect at all. Treat it as progressive enhancement, and set will-change: transform on the source element to keep transforms smooth on the browsers that do support it.

For motion designers crossing into web, see the styleframe-to-UI handoff process for how the conceptual model translates from After Effects timelines to scroll-driven CSS.

When Does GSAP Justify Its 27KB Minimum Bundle Cost?

When the same project uses three or more GSAP-specific features (ScrollTrigger plus timeline labels plus the Flip plugin, for example), the bundle pays for itself. For one-off effects, the calculus is different. Motion's animate() at 2.3-17KB, anime.js v4 (24.5KB for everything, 5.2KB for the animation module alone), and Theatre.js at roughly 31KB gzipped cover the middle ground. The "GSAP-or-nothing" thinking trap is real, and I've watched senior devs reach for it when something lighter would have shipped faster.

Here's how the bundle math actually plays out:

LibrarySizeWhen it earns its weight
CSS only0 KBUI transitions, simple keyframes, View Timeline parallax
anime.js v424.5 KB for all modules, 5.2 KB for animation aloneTimeline sequencing without scroll choreography
Motion (vanilla animate())2.3 KB mini, 17 KB hybridSprings, simple sequences, scroll-linked effects
GSAP core~71 KB minified, ~27 KB gzippedTimeline sequencing, runtime control, CustomEase
GSAP + ScrollTrigger + Flip~55 KB gzipped (the three 3.15.0 files summed)Pinned scroll choreography, FLIP layout animation
Motion for React (motion component)~34 KB; m + LazyMotion starts at ~4.6 KBReact layout animations and AnimatePresence

Motion deserves more airtime than it gets. Most "CSS vs GSAP" comparisons treat the choice as binary. Motion is the honest middle ground for projects that need springs, simple sequencing or layout animations but don't need pinning, and its smallest build costs a fraction of GSAP's. Its npm downloads have climbed sharply year-over-year.

The decision isn't always about animation features. It's also about what your team already knows. If your team has shipped three GSAP projects and the next one needs animation, the GSAP tax is zero, the learning cost is zero, and the bundle is the right tradeoff. If your team has never used GSAP, the learning cost is two days of unfamiliarity plus the bundle. Pick deliberately.

How Do You Handle Reduced-Motion Preferences in Both Stacks?

Both CSS and GSAP need explicit reduced-motion handling, and skipping either layer leaves users with vestibular disorders exposed to animation they've asked the OS to suppress. CSS handles prefers-reduced-motion natively with a media query that wipes out transitions and keyframe animations in three lines. GSAP requires a runtime check, the gsap.matchMedia() API was designed for this. WCAG 2.2 Success Criterion 2.3.3 (Animation from Interactions) is a Level AAA criterion, so covering both layers is what full compliance looks like, but even at AA it's the right thing to do, not a nice-to-have. That gets harder when the animation is a status indicator rather than decoration, which is exactly the problem the Apple Intelligence UI guide works through for AI-processing states built in pure CSS. What that fallback should keep rather than remove is worked out in the animated gradient ring walkthrough: drop the movement, keep the border, because the border is the information.

The CSS reset is short and worth copying into your base stylesheet on day one:

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

For GSAP, the pattern uses gsap.matchMedia() with a conditional context:

const mm = gsap.matchMedia();
mm.add("(prefers-reduced-motion: no-preference)", () => {
  gsap.to(".card", { y: 0, duration: 0.6, stagger: 0.1 });
});

The animation only registers when the user has expressed no preference. If they've enabled reduced motion, GSAP skips the timeline entirely. The cleanup happens automatically when the matchMedia context is torn down.

A meaningful share of users across macOS, iOS, and Windows run with reduced-motion enabled (there's no single authoritative cross-platform figure, but it's well beyond a rounding error). That's not a fringe accommodation, it's a real slice of any audience. Most teams add the CSS reset and forget the GSAP check, then ship motion that ignores the OS setting because it was triggered from JavaScript. Don't be that team.

For how motion intent connects to visual design decisions, see motion graphics hierarchy and the related principles for hierarchy in UI design.

Photo by Jaffer Nizami on Unsplash

Which Should You Choose: A Decision Framework?

The honest answer for most projects is a short tree of five questions. Walk through them in order. The first one that returns "yes" decides the stack.

  1. Does the animation need to coordinate three or more elements with shared timing labels? Yes, GSAP.
  2. Does it need scroll pinning, scrub mapping, or snap-back behavior? Yes, GSAP ScrollTrigger.
  3. Does it need runtime control like pause, reverse, or seek by external input? Yes, GSAP or Motion.
  4. Is this a React project with mixed needs (layout animations, gestures, plus some sequencing)? Yes, Motion for React (formerly Framer Motion).
  5. Is it a single-element transition, hover state, entrance, or simple scroll progress? Yes, CSS only (with View Timeline if you need scroll-driven progress).

There's a sixth meta-rule that saves weeks of wasted work. Prototype the same animation in both stacks for 30 minutes. The one that's still fighting you at minute 30 is the wrong tool for that specific problem. Animation libraries are not religion. They're tools, and the right tool depends on what you're trying to express. If GSAP feels heavy for a problem CSS solves in five lines, ship the CSS. If CSS feels like you're working around a missing feature, ship the GSAP.

For the broader motion craft, the motion design tools comparison covers the design-side tooling, and our dashboard design patterns guide shows what loading and transition motion actually looks like in shipped product UI. One more thing changed the maths here: GSAP went free in April 2025, plugins and all, so the old "it's paid" objection is gone.

What Is the Bottom Line?

Pick the stack that matches the problem, not the stack that matches your familiarity:

  • CSS for 80% of UI animation work, including most hover states, entrances, and View Timeline scroll progress
  • GSAP when you need timeline sequencing, pinning, or runtime control that CSS can't express
  • Motion as the middle ground for projects that need timeline features without GSAP's full plugin weight
  • Always implement reduced-motion handling in both layers, CSS reset plus runtime check

Benchmark on the devices your users actually use. Desktop Chrome on a fast laptop will lie to you about mobile performance every time. And remember the meta-rule: 30 minutes of prototyping in both stacks beats a week of arguing about which one is "better" in the abstract.

If you're a motion designer crossing into web, the styleframe-to-UI pipeline (linked above) covers how to translate motion intent from After Effects into web-deliverable specs that developers can implement in either stack. And if the implementation stack is React specifically, the Framer Motion guide covers the layout, gesture, and exit-transition APIs that GSAP and plain CSS don't have equivalents for.

All three approaches (CSS transitions, scroll-driven CSS, and a GSAP timeline) ship as standalone demos in the code companion repo so you can compare them side by side.

CSS or GSAP is a question about syntax and bundle size. Whether the animation actually reads well, the easing, the anticipation, the weight, is a question no library answers for you. The best primer on that side of the work still comes from hand-drawn animation, and it transfers straight onto a cubic-bezier curve.

The 80% case, in CSS, with no library loaded
Edit the CSS

Comment out the prefers-reduced-motion block, then turn reduced motion on in your OS. The demo keeps moving, and you have reproduced the single most common accessibility failure in both CSS and GSAP work.

Scrub the timeline yourself

The View Timeline claims above are testable in a minute. Switch between scroll and view timelines, move the animation range and watch the preview. It settles the single-timeline case; the four-section pinning scenario above is the one it won't settle, and that's the honest boundary of the CSS side.

Timeline
Reference

Preview: scroll inside the box

Reduced motion is on, so the animation is paused. The CSS below is unchanged.

The bar starts filling when the scroller is at its start, and it is full when the scroller is scrolled all the way to its end. In this demo that is 0% to 100% of the timeline.

timeline-scope lookup rule

Each bar follows the scroller in its own card.

timeline-scope on .card fences the name in, so each bar only matches a timeline inside its own card.

Left bar follows its own scroller. Right bar follows its own scroller.

.card { timeline-scope: --panel; }

.scroller {
  overflow-y: auto;
  scroll-timeline: --panel block;
}

.bar { transform-origin: 0 50%; }

@supports (animation-timeline: scroll()) {
  .bar {
    transform: scaleX(0);
    animation: fill auto linear both;
    animation-timeline: --panel;
  }
}

@keyframes fill { to { transform: scaleX(1); } }

The full scroll timeline playground adds the inline axis, the root and self scrollers and the view inset.

Frequently Asked Questions

Is GSAP free for commercial use in 2026?
Yes. Webflow acquired GreenSock in October 2024, and since April 30, 2025 GSAP has run under a no-charge standard license that covers commercial work and every plugin, including the formerly members-only SplitText and MorphSVG. You no longer need a Business Green membership. One restriction is worth reading: the license bars using GSAP inside tools that let people build visual animations without code and compete with Webflow's own animation features. If you're reading an older article that says GSAP requires a paid license for revenue-generating sites, that information is stale. The current GreenSock license page is the source of truth, check it before adopting GSAP on a paid project just to be safe, but the headline answer is straightforward in 2026: free for ordinary site work.
Does GSAP work with React in 2026?
Yes, and the integration improved significantly with the @gsap/react package. The useGSAP hook handles cleanup automatically, scopes selectors to the component, and prevents the memory leaks that plagued GSAP-in-React setups before 2024. You install both gsap and @gsap/react, wrap your animation code in useGSAP, pass a dependency array, and the hook handles teardown when the component unmounts. SSR works correctly because animations only run in the browser. If you're starting a new React project that needs more than CSS transitions, @gsap/react is the path that has the least friction with the React rendering model.
What's the difference between Motion and Framer Motion?
They're the same project under two names. Framer Motion was rebranded to Motion, and the React build now imports from motion/react instead of framer-motion. Motion's docs say version 14 has no breaking changes for React, and the old framer-motion package is still published on npm. The framework-agnostic animate() function is tiny: 2.3kb for the mini version and 17kb for the hybrid version, which adds springs and more. The React motion component is bigger, about 34kb, because it carries layout animations, exit animations, and gesture support. Same author, Matt Perry. If you're on React and you need layout animations or AnimatePresence for exit transitions, Motion for React earns its larger bundle, and the m component with LazyMotion cuts the initial cost to about 4.6kb plus 15kb for the animation features. If you're on Vue, Svelte, or vanilla JS, or you don't need React-specific features, the plain animate() function is the right pick.
Can the View Timeline API replace ScrollTrigger?
For simple parallax and progress-bar effects, yes. For pinning, scrub, and snap-back behavior, no. The CSS Scroll-Driven Animations Module Level 1 spec covers view-timeline and animation-range, which is enough to drive opacity, transform, and color changes as an element passes through the viewport. What the spec deliberately does not include is pinning, the behavior where an element sticks while other content scrolls past it. ScrollTrigger handles pinning natively. If your design needs pinning, GSAP wins for now. If it doesn't, View Timeline is the lighter path.
Which animation library has the smallest bundle in 2026?
Motion's animate() is the smallest serious option at 2.3kb for the mini version, or 17kb for the hybrid one. Anime.js v4 lists 24.5KB for the whole library, split into modules, with the animation module alone at 5.2KB. GSAP's core is a single file of about 71KB minified, roughly 27KB gzipped in version 3.15. The React motion component is about 34kb. For perspective, a single high-resolution hero image typically weighs 100KB or more, so the animation library is rarely the limiting factor on page weight. But for projects with aggressive bundle budgets, a single-page landing page, a mobile-first PWA, the difference between 2kb and 27kb matters. Verify current sizes on bundlephobia before committing, library weight shifts between releases.