iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
For most React interface work, Motion is the easier default, especially when animations follow component state, gestures, or enter and exit transitions. GSAP is the stronger choice when you need long, tightly controlled timelines, sequences you edit while they play, or one of its specialist plugins. Both work well in React. The right pick depends on the shape of the animation work, not on a universal winner.
What each library is
Motion for React
Motion for React, formerly Framer Motion, is installed with the npm package motion, and its React APIs are imported from motion/react. You describe what a component should look like in each state through props such as animate, whileHover, whileTap, whileInView, and exit, and Motion animates between those values as they change. The same API covers AnimatePresence for exit animations, layout animations, SVG, and scroll hooks such as useScroll.
Motion’s own React guide draws a useful boundary on its scope: “For simple, self-contained effects (like a color change on hover) a standard CSS transition is a lightweight solution.” If your effect is one property changing on hover, plain CSS may be the simplest answer before either library enters the picture.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →GSAP and @gsap/react
GSAP is a framework-agnostic JavaScript animation library. It is not tied to React, so its React integration ships as a separate package, @gsap/react. That package provides the useGSAP hook, which the GSAP React guide describes as “a drop-in replacement for useEffect() or useLayoutEffect() that automatically handles cleanup using gsap.context().” You write animations imperatively, creating tweens and timelines and calling methods on them, and React simply hosts that setup.
#1 Best Overall
How the two models differ
The biggest difference is the mental model. Motion asks you to describe target values in props and lets React drive the changes. GSAP asks you to build an animation and control it. The table below sets out the differences that matter most when you choose.
| Area | Motion for React | GSAP with @gsap/react |
|---|---|---|
| Model | Declarative: target values are expressed in component props | Imperative: tweens and timelines are created and controlled in code |
| React entry point | Components such as motion.div imported from motion/react |
The useGSAP hook from @gsap/react |
| Sequencing | Array-based animate() sequences |
Mutable timelines; tracks can be added or removed during playback |
| Built-in React features | Gestures, enter and exit, layout animation, and scroll hooks in the documented React API | Core tweening; additional behaviors come from the plugin collection |
| Specialist plugins | Not stated in the comparison source | ScrollTrigger, ScrollSmoother, SplitText, DrawSVG, MorphSVG, MotionPath, Flip, Draggable, and Inertia are listed in GSAP’s documentation index |
Sources for this comparison are Motion’s official React documentation and comparison page, and GSAP’s official documentation index and React guide.
Decision guide by project need
| Project need | Better starting point | Why |
|---|---|---|
| Animate UI state directly from React | Motion | Animation targets are expressed declaratively in component props. |
| Gestures, enter and exit, and layout transitions | Motion | These are documented as part of the React API. |
| Scroll-triggered or scroll-linked behavior | Either; compare the exact effect | Motion documents whileInView and useScroll. GSAP offers ScrollTrigger in its plugin collection. |
| Long, choreographed sequences | GSAP if its timeline controls fit; Motion can also sequence | GSAP’s timelines stay editable during playback. Motion supports array-based sequencing. |
| Text splitting, SVG drawing or morphing, path motion, flip, or drag | GSAP, if the required plugin fits | SplitText, DrawSVG, MorphSVG, MotionPath, Flip, and Draggable are GSAP plugins. Confirm current availability and license terms for the exact plugin. |
| A small animation surface in an existing app | Measure both in your production build | Bundle impact depends on imports, tree-shaking, and build setup. See the performance section below. |
Using GSAP in React without leaking animations
Most GSAP problems in React come from cleanup, not from the animation code itself. The useGSAP hook addresses that. It scopes selector text to a container ref, and it reverts the animations it created when the component unmounts or the hook is torn down. A minimal setup looks like this:
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →import { useRef } from "react";
import { useGSAP } from "@gsap/react";
import gsap from "gsap";
export default function Cards() {
const container = useRef(null);
useGSAP(
() => {
gsap.from(".card", { opacity: 0, y: 20, stagger: 0.1 });
},
{ scope: container }
);
return <div ref={container}><div className="card" /></div>;
}
Two settings control when setup runs again. The dependencies array determines when the hook re-executes, and revertOnUpdate determines whether existing animations are reverted before the refresh. The official guide states the hook is safe in server-rendering environments when used in client components. In the Next.js App Router, or any React Server Components setup, the component file needs the "use client" directive at the top.
Rank #3
Callbacks created after the first run
Animations created later, inside click handlers, timeouts, or other delayed functions, are not captured by the original hook execution. Wrap those callbacks with contextSafe so they take part in automatic cleanup. The hook returns it alongside the context:
const { contextSafe } = useGSAP({ scope: container });
const handleOpen = contextSafe(() => {
gsap.to(".panel", { height: "auto", duration: 0.4 });
});
Any event listeners you attach manually, outside GSAP’s context, also need to be removed in the cleanup function. GSAP’s cleanup will not do this for you.
Rank #4
Performance and bundle size: what the published numbers show
Motion’s comparison page makes two speed claims: Motion 11 was 2.5x faster than GSAP at animating from unknown values, and 6x faster at animating between different value types. The page does not state a publication date, and it was published by Motion, which is one of the libraries compared. Treat these as the vendor’s own measurements under conditions it did not fully document in the accessed version, not as independent results. The same page lists approximate bundle sizes for selected APIs from each library. Those figures are also vendor-reported and depend on which APIs you import.
Recommended Free Tools
Motion’s separate size documentation adds a practical distinction. Importing the full motion component API cannot be tree-shaken below the base size Motion states. Using the lighter m component together with LazyMotion lowers initial load by loading only the features you need. Shipped size therefore depends on how you import, not only on which library you pick.
Best Value
How to check the cost in your own app
- Build your app for production with the bundler you already use.
- Run a bundle analyzer and find how much each animation library adds to the initial chunk.
- If you are evaluating Motion, compare the full import against the
mplusLazyMotionsetup and record both sizes. - Open the page in Chrome DevTools and record a Performance profile while the real animations run, on a throttled CPU setting that reflects your users’ devices.
- Compare frame timing and main-thread work for the two candidate implementations of the same effect, not for a generic demo.
When plugins decide the question
GSAP’s plugin collection is the strongest reason to pick it. If your project depends on splitting text into characters or lines, drawing or morphing SVG paths, moving along a motion path, flip-style layout transitions, or inertial dragging, check the relevant GSAP plugin first. Plugin access and license terms can change, so confirm them on GSAP’s own pages before you build on a specific plugin. Motion’s React API does not need a separate plugin for its gesture, layout, exit, and scroll features, which is part of why it is the simpler default for everyday UI work.
Practical guidance for choosing
- Start with Motion if your animations are mostly state changes, hover and tap feedback, page or list transitions, or scroll reveals tied to components.
- Start with GSAP if you are building a timeline-heavy piece, need to modify sequences during playback, or already use GSAP elsewhere in your stack.
- Consider plain CSS for single-property effects before adding either library.
- If you mix the two in one project, keep each library’s responsibilities clear so you do not maintain two timing systems for similar effects.
Limits of this comparison
This comparison draws on Motion’s and GSAP’s official documentation as checked in October 2026. The performance and size figures come from Motion’s own comparison page, and no independent benchmark covering both libraries was available to us. The guidance above is based on documented features and API behavior, not on a hands-on test of both libraries in the same application. Package APIs, plugin availability, and license terms change, so verify them against the current official documentation before committing to a choice.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

