Comparisons

Framer Motion vs GSAP: React components, timelines, layout, scroll and licensing

Framer Motion (now Motion) vs GSAP compared: declarative React props vs timelines, layout and exit animations, springs, scroll, SSR and licences, with code.

20 November 2026 · 8 min read

If you build a React app and want more than CSS transitions, the choice usually comes down to two libraries: Motion, which most people still call Framer Motion, and GSAP. Both are mature, fast and widely used. They are also built on very different ideas, and those ideas decide which one feels natural in your codebase.

This post compares them on the things that matter day to day: the programming model, layout and exit animations, springs, sequencing, scroll, framework scope, server rendering and licensing. Then it writes the same animation in both and ends with a decision rule. If your real question is whether you need a library at all, start with GSAP vs CSS animation.

A note on names

Framer Motion left Framer and became an independent project called Motion. The package is now motion, and React components are imported from motion/react. The API is the same motion.div and AnimatePresence you may know, and the old framer-motion package keeps working for existing projects. This post uses "Motion" for the library.

npm install motion
npm install gsap @gsap/react

Side by side

MotionGSAP
StyleDeclarative: props on componentsImperative: tweens and timelines in code
FrameworkReact first; also a vanilla animate() API and a Vue versionFramework-agnostic; works anywhere there is a DOM
Exit animationsAnimatePresenceYou delay unmounting yourself
Layout animationslayout and layoutId propsFlip plugin
Default motionSprings for physical propertiesDuration and named eases
SequencingVariants with stagger, or animate() sequencesTimelines with labels and relative positions
ScrolluseScroll and useTransformScrollTrigger: scrub, pin, snap, callbacks
LicenceMITFree, including commercial use, under GSAP's own licence

Declarative props vs imperative timelines

Motion treats animation as part of the component's render. You describe the target state with props, and Motion animates whenever those props change. Animation follows React state, the same way the rest of your UI does.

import { motion } from "motion/react";

export function Drawer({ open }) {
  return (
    <motion.aside
      initial={false}
      animate={{ x: open ? 0 : 320, opacity: open ? 1 : 0 }}
      transition={{ type: "spring", stiffness: 400, damping: 36 }}
    />
  );
}

GSAP treats animation as something you run. You select elements, create a tween or timeline, and control it from code. In React, the useGSAP hook from @gsap/react runs your setup after render and reverts everything on unmount, and the scope option keeps selectors inside your component.

import { useRef } from "react";
import gsap from "gsap";
import { useGSAP } from "@gsap/react";

gsap.registerPlugin(useGSAP);

export function Drawer({ open }) {
  const ref = useRef(null);

  useGSAP(() => {
    gsap.to(ref.current, { x: open ? 0 : 320, opacity: open ? 1 : 0, duration: 0.35, ease: "power3.out" });
  }, { dependencies: [open] });

  return <aside ref={ref} />;
}

For state-driven UI, the Motion version is shorter and harder to get wrong. For a scripted sequence that does not map to state, such as a hero intro or a product tour, the GSAP model is often clearer.

Exit and layout animations

This is Motion's biggest advantage in React. When a component unmounts, React removes it from the DOM immediately, so there is nothing left to animate. AnimatePresence keeps the element around until its exit animation finishes.

import { AnimatePresence, motion } from "motion/react";

export function Toast({ visible, children }) {
  return (
    <AnimatePresence>
      {visible && (
        <motion.div
          key="toast"
          initial={{ opacity: 0, y: 12 }}
          animate={{ opacity: 1, y: 0 }}
          exit={{ opacity: 0, y: 12 }}
        >
          {children}
        </motion.div>
      )}
    </AnimatePresence>
  );
}

Layout animations work the same way. Add layout to an element and Motion animates it when its size or position changes, for example when a list is reordered or a card expands. Give two elements the same layoutId and Motion animates one into the other, which is how shared-element effects like a sliding tab underline are usually built.

GSAP covers layout with its Flip plugin: record the state with Flip.getState(), change the DOM, then call Flip.from() to animate from the old positions to the new ones. It is powerful and works outside React, but in a React app you have to capture the state before React re-renders and run the animation after, which takes more care. Exit animations in GSAP mean keeping the element mounted yourself until the tween's onComplete fires.

Springs vs eases

Motion uses spring physics by default for physical properties like x, y and scale. A spring is defined by stiffness and damping (or by a visual duration and bounce), not a fixed duration. When a spring is interrupted, it carries the current velocity into the new target, so a fast toggle feels continuous instead of restarting.

GSAP is built around durations and named eases such as power3.out, back.out and elastic.out, plus custom curves through its CustomEase plugin. Eases are predictable: you know exactly when a tween ends, which is what you want when several steps must line up. back and elastic give overshoot, but they are curves, not physics, so they do not respond to velocity. For more on curves, see CSS easing functions explained.

Timelines and sequencing

GSAP's timeline is still the best tool for long, choreographed sequences. Each step is placed relative to the previous one, can overlap it, or start at a label, and the whole timeline can be paused, reversed, sped up or scrubbed.

const tl = gsap.timeline({ defaults: { duration: 0.5, ease: "power3.out" } });

tl.from(".hero-title", { y: 40, opacity: 0 })
  .from(".hero-copy", { y: 20, opacity: 0 }, "-=0.3")
  .from(".hero-cta", { scale: 0.9, opacity: 0 }, "<0.1")
  .add("ready");

Motion handles the common cases well: variants propagate from parent to children, and staggerChildren and delayChildren sequence a list. The animate() function also accepts an array of steps for a sequence. For a few staggered steps this is plenty, and our Framer Motion stagger guide covers it in detail. For a long sequence with many overlapping steps that you need to scrub or seek, GSAP is easier.

Scroll

Motion's useScroll returns motion values for scroll progress, of the page or of an element as it passes through the viewport. You map them to styles with useTransform, and the result updates without re-rendering React.

import { useRef } from "react";
import { motion, useScroll, useTransform } from "motion/react";

export function Reveal({ children }) {
  const ref = useRef(null);
  const { scrollYProgress } = useScroll({ target: ref, offset: ["start end", "end start"] });
  const y = useTransform(scrollYProgress, [0, 1], [60, -60]);

  return <motion.div ref={ref} style={{ y }}>{children}</motion.div>;
}

GSAP's ScrollTrigger goes further: pinning a section while a timeline plays through it, snapping to labels, enter and leave callbacks, and markers for debugging. If the page is built around scroll storytelling, ScrollTrigger is the more complete tool. For simple parallax and reveals, both work, and so do CSS scroll-driven animations with no library at all.

Framework scope and server rendering

Motion is designed for React. Its best features, AnimatePresence, layout animations and variants, depend on React's component model. It does offer a vanilla animate() function and a Vue version, but if your stack mixes frameworks, or includes plain HTML pages, GSAP works the same everywhere.

Both libraries run in the browser. In Next.js with the App Router, any component that uses motion.div, Motion hooks or useGSAP must be a client component, with "use client" at the top of the file. The usual pattern is to keep pages as server components and wrap only the animated parts in small client components. Motion also offers a motion/react-client entry for using motion elements directly in server components, but they still render and animate on the client.

Licensing

Motion is open source under the MIT licence. GSAP, including the plugins that used to need a paid membership such as SplitText and MorphSVG, is free to use, including in commercial projects, since Webflow acquired it. It is not MIT, though. It uses its own standard licence with its own terms, so read it on the GSAP site before you ship, especially if you build tools or products that compete with Webflow.

The same animation in both

A list of cards that fades up with a stagger when it mounts. Motion version:

"use client";
import { motion } from "motion/react";

const list = { hidden: {}, show: { transition: { staggerChildren: 0.08 } } };
const item = {
  hidden: { opacity: 0, y: 16 },
  show: { opacity: 1, y: 0, transition: { duration: 0.4, ease: [0.22, 1, 0.36, 1] } },
};

export function Cards({ items }) {
  return (
    <motion.ul variants={list} initial="hidden" animate="show">
      {items.map((card) => (
        <motion.li key={card.id} variants={item}>{card.title}</motion.li>
      ))}
    </motion.ul>
  );
}

GSAP version:

"use client";
import { useRef } from "react";
import gsap from "gsap";
import { useGSAP } from "@gsap/react";

gsap.registerPlugin(useGSAP);

export function Cards({ items }) {
  const root = useRef(null);

  useGSAP(() => {
    gsap.from(".card", { opacity: 0, y: 16, duration: 0.4, ease: "power3.out", stagger: 0.08 });
  }, { scope: root });

  return (
    <ul ref={root}>
      {items.map((card) => (
        <li className="card" key={card.id}>{card.title}</li>
      ))}
    </ul>
  );
}

Both give the same result. The Motion version describes states and lets the library work out the rest. The GSAP version describes the motion directly and is easy to extend into a longer timeline. Neither handles reduced motion on its own: use Motion's useReducedMotion or MotionConfig reducedMotion="user", and gsap.matchMedia() with a prefers-reduced-motion query in GSAP.

Which one to choose

  • Choose Motion when you are in React and most of your animation follows component state: menus, modals, toasts, tabs, reordering lists, shared-element transitions and anything that needs an exit animation.
  • Choose GSAP when the motion is a scripted sequence, a scroll-driven story with pinning, SVG-heavy work, or when you need the same code across React, other frameworks and plain pages.
  • Use both if you need both, but never on the same property of the same element.

Whichever you pick, start from real numbers. If you are recreating motion from a site you admire, Capture Motion records it while it plays and exports the keyframes, durations, delays and easing as React, GSAP or CSS code, so you start from measured timing instead of guesses. For moving existing CSS into Motion, see CSS keyframes to Framer Motion.

Questions

Is Framer Motion the same as Motion?

Yes. Framer Motion was renamed Motion and became an independent project. New code installs the motion package and imports React components from motion/react; the old framer-motion package still works for existing projects.

Can I use GSAP and Motion in the same project?

Yes, as long as they never animate the same property on the same element, because both write inline styles and will fight. A common split is Motion for component state and exit animations, GSAP for one long scroll-driven sequence.

Do Motion and GSAP work with Next.js server components?

Both run in the browser, so components that use them must be client components with "use client" at the top. Your server components can still render those client components as children.

How do I find the timing of a Motion or GSAP animation on a live site?

Capture Motion records the animation while it plays and reads the keyframes, durations, delays and easing of every animated property, including GSAP tweens. You can export the result as React, GSAP or CSS code, or as JSON to paste into Figma or an AI assistant.