Comparison · Build

GSAP vs Framer Motion vs CSS scroll-driven animations for scroll-story sites

By Md Mahafuj Alam · Updated

For a long, pinned, multi-chapter scroll story, GSAP ScrollTrigger is the most complete tool: built-in pinning, smoothed scrub and timelines that map many tweens onto one scroll distance. Motion (the library formerly called Framer Motion) is the lighter fit for React components that react to scroll. CSS scroll-driven animations need no JavaScript and can run off the main thread, but MDN still marks them as not Baseline, so treat them as an enhancement.

Three tools, three models of scroll

This comparison is based on each vendor’s published documentation and on MDN’s browser compatibility data as of October 2026. It is not a benchmark. All three tools can tie an animation to scroll position, but they think about it differently, and that difference decides which one fits a scroll story.

GSAP with ScrollTrigger is a JavaScript animation engine plus a scroll plugin. ScrollTrigger works out the start and end scroll positions of each trigger up front, then responds to scroll events, and recalculates on resize and refresh. You attach it to a tween or, more usefully, to a whole timeline. GSAP is maintained by its original team at Webflow, and its pricing page states the entire library is free. The standard license covers commercial use, including the plugins that used to be members-only. Its one restriction is on building visual, no-code animation tools that compete with Webflow.

Motion is the library formerly published as Framer Motion. Its upgrade guide tells you to uninstall framer-motion, install motion and import from motion/react. For scroll it offers the useScroll hook in React and a scroll() function in vanilla JavaScript. Both produce a progress value from 0 to 1 that you map onto styles.

CSS scroll-driven animations are a browser feature. You write ordinary @keyframes and set animation-timeline to scroll() (progress of a scroller) or view() (progress of an element through its scroller), or to a named timeline. No library is involved.

Pinning, scrub and timelines

A scroll story lives or dies on three things: holding a scene in place while the visitor scrolls (pinning), tying progress to the scrollbar (scrub), and sequencing many movements inside one pinned stretch (timelines).

Pinning

ScrollTrigger has pinning built in. pin: true pins the trigger element, and by default it adds padding so the content after it is not covered; pinSpacing: false turns that off. Motion and CSS have no pin option. With both you use the CSS pattern instead: a tall outer section with a position: sticky stage inside. That works well, but you manage the height of the track yourself.

Scrub

In ScrollTrigger, scrub: true links progress directly to the scrollbar. A number adds smoothing: the ScrollTrigger docs describe it as the time in seconds the playhead takes to catch up, so scrub: 0.5 trails by half a second. Motion’s scrollYProgress is a direct link; you add easing through the values you map it to. CSS ties progress to scroll exactly, with no catch-up smoothing.

Timelines

This is GSAP’s strongest point. You build one timeline for a chapter and attach a single ScrollTrigger to it. The docs explain that tween durations then act as proportions of the scroll distance, so you can retime a chapter by changing ratios rather than pixel values. Motion maps each value separately with useTransform, using input ranges such as [0.2, 0.5] to place a movement inside the section’s progress. CSS uses animation-range to place each animation within the timeline. Both work, but sequencing ten overlapping movements is easier to read and change as one GSAP timeline.

The same effect in all three

The effect: a section holds the screen for one viewport height of scrolling while a card grows from 60% to full size and fades in. Scrolling back reverses it. Each version skips the animation when the visitor has asked for reduced motion.

GSAP + ScrollTrigger (React)tsx
'use client';
import { useRef } from 'react';
import { gsap } from 'gsap';
import { ScrollTrigger } from 'gsap/ScrollTrigger';
import { useGSAP } from '@gsap/react';

gsap.registerPlugin(ScrollTrigger, useGSAP);

export function Reveal() {
  const section = useRef<HTMLElement>(null);

  useGSAP(
    () => {
      const mm = gsap.matchMedia();
      mm.add('(prefers-reduced-motion: no-preference)', () => {
        gsap.fromTo(
          '.card',
          { scale: 0.6, opacity: 0 },
          {
            scale: 1,
            opacity: 1,
            ease: 'none',
            scrollTrigger: {
              trigger: section.current,
              start: 'top top',
              end: '+=100%',
              pin: true,
              scrub: true,
            },
          },
        );
      });
    },
    { scope: section },
  );

  return (
    <section ref={section} style={{ height: '100vh', display: 'grid', placeItems: 'center' }}>
      <div className="card">Chapter one</div>
    </section>
  );
}

useGSAP comes from @gsap/react. It wraps your code in gsap.context(), so the tween and its ScrollTrigger are reverted when the component unmounts, and scope limits the .card selector to this section.

Motion (React)tsx
'use client';
import { useRef } from 'react';
import { motion, useReducedMotion, useScroll, useTransform } from 'motion/react';

export function Reveal() {
  const track = useRef<HTMLElement>(null);
  const { scrollYProgress } = useScroll({ target: track, offset: ['start start', 'end end'] });
  const scale = useTransform(scrollYProgress, [0, 1], [0.6, 1]);
  const opacity = useTransform(scrollYProgress, [0, 1], [0, 1]);
  const reduce = useReducedMotion();

  return (
    <section ref={track} style={{ height: '200vh' }}>
      <div style={{ position: 'sticky', top: 0, height: '100vh', display: 'grid', placeItems: 'center' }}>
        <motion.div className="card" style={reduce ? undefined : { scale, opacity }}>
          Chapter one
        </motion.div>
      </div>
    </section>
  );
}

The 200vh track with a 100vh sticky stage gives the same 100vh of held scroll as GSAP’s end: '+=100%'. The offset ['start start', 'end end'] is Motion’s default, written out here for clarity.

CSS scroll-driven animationcss
/* <section class="track"><div class="stage"><div class="card">Chapter one</div></div></section> */
.track {
  height: 200vh;
  view-timeline: --reveal block;
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
}

@keyframes reveal {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .card {
      animation: reveal linear both;
      animation-timeline: --reveal;
      animation-range: contain 0% contain 100%;
    }
  }
}

The track names a view timeline, and the card, a descendant, uses it. Because the track is taller than the viewport, the contain range runs from the track’s top meeting the top of the viewport to its bottom meeting the bottom: the same 100vh. animation-timeline comes after the animation shorthand on purpose. MDN notes the shorthand resets animation-timeline to auto. In a browser without support, the @supports block is skipped and the card simply shows at full size.

Browser support and bundle size

GSAP and Motion are JavaScript, so they run wherever your build targets run. CSS scroll-driven animations depend on the browser. The MDN page for animation-timeline marks it as “Limited availability” and not Baseline. MDN’s browser-compat data lists support from Chrome and Edge 115 and Safari 26. For Firefox it lists version 159, which MDN’s release data gives a release date of 27 October 2026 (in beta when this was written). Until a visitor(in beta when this was written). Until then, Firefox users get the fallback.rsquo;s browser supports it, they see only what your fallback styles provide. The same versions are listed for animation-range.

On size, Motion states that its scroll() function is 3.8kb. The GSAP pages used for this comparison (pricing, installation and ScrollTrigger) do not publish a size, so measure it in your own build rather than trusting a figure from elsewhere. CSS adds nothing to your JavaScript bundle.

Performance model: main thread or compositor

GSAP is a JavaScript engine: it calculates values and writes them to the page on the main thread. That is fine for transforms and opacity on a few elements, and it is what lets GSAP animate almost anything, including canvas frame indexes and three.js uniforms. The cost is that a busy main thread, from hydration, image decoding or heavy React renders, can delay updates.

CSS scroll-driven animations can avoid that. Chrome’s developer guide says they can run off the main thread, and its examples animate transform rather than width to stay composited. Animating layout properties such as width or top gives up that advantage in any of the three tools.

Motion sits in between. Its scroll() docs say browsers that support the ScrollTimeline API will use it to run supported animations with hardware acceleration, and the useScroll docs say passing progress to opacity, or through useTransform to transform, clipPath or filter, creates GPU-accelerated animations. Elsewhere it falls back to JavaScript.

React integration and reduced motion

React. Motion is built for React: motion.div, hooks and motion values that update styles without re-rendering the component. GSAP is framework-agnostic; in React you use useGSAP from @gsap/react, which handles cleanup through gsap.context(). Animations created later, for example in click handlers, need contextSafe() to be cleaned up. CSS needs no integration at all, which also makes it the only option that works in server-rendered pages that ship no JavaScript.

Reduced motion. None of the three disables scroll animation for you, so handle it explicitly.

  • GSAP: gsap.matchMedia() with (prefers-reduced-motion: no-preference), and optionally a second branch for reduce with a gentler version.
  • Motion: MotionConfig reducedMotion="user" disables transform and layout animations on motion components, per the accessibility docs. Their parallax example still checks useReducedMotion() by hand for scroll-linked values, as the example above does.
  • CSS: wrap the scroll-driven rules in @media (prefers-reduced-motion: no-preference).

The reduced motion guide covers what to show instead of the animation.

Comparison table

Based on each vendor's documentation and MDN compatibility data, October 2026.
GSAP + ScrollTriggerMotionCSS scroll-driven
PinningBuilt in (pin, pinSpacing)Use position: stickyUse position: sticky
ScrubDirect, or smoothed in secondsDirect; shape via mapped valuesDirect only
TimelinesOne timeline per trigger; durations become proportionsuseTransform ranges per valueanimation-range per animation
SizeNot stated on its docs pagesscroll() stated as 3.8kbNo JavaScript
Browser supportAny browser your build targetsAny; uses ScrollTimeline where supportedChrome/Edge 115, Safari 26; MDN lists Firefox 159, due 27 October 2026
ReactuseGSAP from @gsap/reactNative (motion/react)None needed
Runs onMain threadHardware-accelerated where supported, else JSCan run off the main thread
Reduced motiongsap.matchMedia()MotionConfig / useReducedMotion@media query
Drives canvas or WebGLYesYes (read progress)No
LicenseFree, incl. plugins; one no-code-tool restrictionMIT (per its npm package)Web standard

Which to pick for a scroll-story site

  • Pick GSAP for a multi-chapter story with pinned scenes, many overlapping movements, smoothed scrub, or a canvas or three.js scene underneath. Pair it with Lenis for smooth scrolling; the GSAP ScrollTrigger and Lenis guide shows the Next.js wiring.
  • Pick Motion when the site is a React app and scroll effects are local to components: a progress bar, parallax images, cards that reveal as they enter. It reads naturally next to the rest of your JSX.
  • Pick CSS for small, decorative effects that should cost no JavaScript, such as a reading progress bar or fade-ins, and for pages that ship no JavaScript. Write it so the page is complete without the animation.

They also mix. A GSAP story can sit on a page whose minor reveals are CSS. The Edok Motion templates that drive footage and 3D from scroll, such as Orbitly, use GSAP ScrollTrigger with Lenis. For the full workflow from idea to deployed site, start with the guide to building a 3D website with Claude, or browse the templates to read a finished implementation.

FAQ

Questions, answered.

The questions people ask most about this topic.

01Is Framer Motion the same as Motion?

Yes. Motion is the library formerly published as Framer Motion. Its upgrade guide says to uninstall framer-motion, install the motion package and change imports from "framer-motion" to "motion/react".

02Is GSAP free for commercial projects?

GSAP states the whole library is free, supported by Webflow, and its standard license covers commercial use, including formerly members-only plugins such as SplitText and MorphSVG. The license restricts using GSAP in visual, no-code animation tools that compete with Webflow.

03Can CSS scroll-driven animations replace GSAP ScrollTrigger?

For simple scroll-linked effects, yes. For pinned multi-chapter stories they lack built-in pinning, smoothed scrub and one-timeline sequencing, they cannot drive a canvas or three.js scene, and MDN still marks animation-timeline as not Baseline.

04Which browsers support animation-timeline?

MDN browser-compat data lists Chrome and Edge 115, Safari 26 and Firefox 159. MDN lists Firefox 159 with a release date of 27 October 2026, so check MDN for the current status before relying on it.

05Does Motion respect prefers-reduced-motion for scroll animations?

MotionConfig with reducedMotion="user" disables transform and layout animations on motion components. Motion's own parallax example still checks useReducedMotion() for scroll-linked values, so do that explicitly.