<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/motion-vs-gsap-in-react-which-animation-library-should-you-choose--7czytdi4y" -->

---
title: Motion vs GSAP in React: Which Animation Library Should...
description: A detailed comparison of Motion (formerly Framer Motion) and GSAP for building animations in React, covering exit animations, hover/tap interactions, and page...
canonical: https://daily.dev/posts/motion-vs-gsap-in-react-which-animation-library-should-you-choose--7czytdi4y
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Motion vs GSAP in React: Which Animation Library Should You Choose? | daily.dev
og:description: A detailed comparison of Motion (formerly Framer Motion) and GSAP for building animations in React, covering exit animations, hover/tap interactions, and page...
og:url: https://daily.dev/posts/motion-vs-gsap-in-react-which-animation-library-should-you-choose--7czytdi4y
og:image: https://api.daily.dev/og/posts/7czyTdi4y.png
og:image:alt: Motion vs GSAP in React: Which Animation Library Should You Choose?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Motion vs GSAP in React: Which Animation Library Should You Choose?

**[Syncfusion](https://daily.dev/sources/syncfusion)** · 18 min read · 3 upvotes · 0 comments

## Summary

A detailed comparison of Motion (formerly Framer Motion) and GSAP for building animations in React, covering exit animations, hover/tap interactions, and page transitions with code examples for both libraries. Motion integrates more naturally with React's component lifecycle via AnimatePresence, requiring less boilerplate for exit animations, gestures, and route transitions. GSAP operates at a lower, DOM-oriented level, offering superior timeline control, scroll-driven effects, and SVG animation but demands more manual coordination in React via refs and the @gsap/react useGSAP hook. The piece also covers reduced-motion accessibility patterns, performance caveats (no universal winner, depends on profiling), common React animation pitfalls, and guidance on when to use each library or combine both.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.syncfusion.com/blogs/post/motion-vs-gsap-react>

## Questions this post answers

### How do I create an exit animation in React when a component unmounts?

Wrap the component in Motion's AnimatePresence component, which keeps the DOM node mounted until its exit animation finishes. Define initial, animate, and exit props on a motion.div with a stable key; when the component's conditional rendering becomes false, AnimatePresence delays removal until the exit transition completes, avoiding the abrupt disappearance React normally causes.

_daily.dev surfaces animation library comparisons like this for developers weighing Motion against GSAP._

### Should I use motion or framer-motion as the package name in a new React project?

Use the motion package with imports from motion/react, since motion is the current name for the library previously called Framer Motion. The older framer-motion package still exists and works for backward compatibility, but new projects should adopt motion/react for consistency with current documentation and examples.

_Developers migrating animation dependencies can track naming changes like this via daily.dev._

### How do I handle React page transitions with React Router and Motion's AnimatePresence?

Wrap useOutlet()'s returned element in AnimatePresence with mode="wait", keying it by location.pathname, rather than wrapping the entire Routes tree. Since AnimatePresence only tracks its direct children's keys, wrapping Routes itself would remount the whole layout including shared nav or sidebar on every navigation; wrapping just the outlet content keeps that layout mounted while animating page transitions.

_daily.dev helps developers comparing React routing and animation patterns stay on top of implementation details._

## Similar posts on daily.dev

- [Choosing a React Animation Library: Performance Trade-Offs in Real Apps](https://daily.dev/posts/choosing-a-react-animation-library-performance-trade-offs-in-real-apps-jnqs7iz41) · Syncfusion · 43 upvotes · 2 comments
- [React ViewTransition vs. Motion: Comparing animation approaches](https://daily.dev/posts/react-viewtransition-vs-motion-comparing-animation-approaches-8boanxhvn) · LogRocket · 20 upvotes · 1 comments
- [A Tour Of The Landscape](https://daily.dev/posts/a-tour-of-the-landscape-zxvoov4lf) · Larablog · 0 upvotes · 0 comments
- [CSS vs. JavaScript • Josh W. Comeau](https://daily.dev/posts/css-vs-javascript-josh-w-comeau-iod0ibfwj) · Josh W Comeau · 114 upvotes · 6 comments
- [Building Horeca: Advanced Motion Design in Webflow Without the Performance Trade-Offs](https://daily.dev/posts/building-horeca-advanced-motion-design-in-webflow-without-the-performance-trade-offs-isagsxnpf) · Codrops · 1 upvotes · 0 comments

---

Tags: [#react](https://daily.dev/tags/react), [#accessibility](https://daily.dev/tags/accessibility), [#web-animation](https://daily.dev/tags/web-animation)

[View this post on daily.dev](https://daily.dev/posts/motion-vs-gsap-in-react-which-animation-library-should-you-choose--7czytdi4y)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Motion vs GSAP in React: Which Animation Library Should You Choose?","url":"https://daily.dev/posts/motion-vs-gsap-in-react-which-animation-library-should-you-choose--7czytdi4y","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/motion-vs-gsap-in-react-which-animation-library-should-you-choose--7czytdi4y"},"datePublished":"2026-09-18T11:56:14.928Z","dateModified":"2026-09-18T11:56:50.565Z","description":"A detailed comparison of Motion (formerly Framer Motion) and GSAP for building animations in React, covering exit animations, hover/tap interactions, and page...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6495986c3c2237a28e9d0ec25436dec9?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6495986c3c2237a28e9d0ec25436dec9?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Syncfusion","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Syncfusion","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/064efc4834bd43b987bcda02e8ad6709","url":"https://daily.dev/sources/syncfusion"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/motion-vs-gsap-in-react-which-animation-library-should-you-choose--7czytdi4y","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"react,accessibility,web-animation","timeRequired":"PT18M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Syncfusion","item":"https://daily.dev/sources/syncfusion"},{"@type":"ListItem","position":3,"name":"Motion vs GSAP in React: Which Animation Library Should You Choose?"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/motion-vs-gsap-in-react-which-animation-library-should-you-choose--7czytdi4y#faq","mainEntity":[{"@type":"Question","name":"How do I create an exit animation in React when a component unmounts?","acceptedAnswer":{"@type":"Answer","text":"Wrap the component in Motion's AnimatePresence component, which keeps the DOM node mounted until its exit animation finishes. Define initial, animate, and exit props on a motion.div with a stable key; when the component's conditional rendering becomes false, AnimatePresence delays removal until the exit transition completes, avoiding the abrupt disappearance React normally causes. daily.dev surfaces animation library comparisons like this for developers weighing Motion against GSAP."}},{"@type":"Question","name":"Should I use motion or framer-motion as the package name in a new React project?","acceptedAnswer":{"@type":"Answer","text":"Use the motion package with imports from motion/react, since motion is the current name for the library previously called Framer Motion. The older framer-motion package still exists and works for backward compatibility, but new projects should adopt motion/react for consistency with current documentation and examples. Developers migrating animation dependencies can track naming changes like this via daily.dev."}},{"@type":"Question","name":"How do I handle React page transitions with React Router and Motion's AnimatePresence?","acceptedAnswer":{"@type":"Answer","text":"Wrap useOutlet()'s returned element in AnimatePresence with mode=\"wait\", keying it by location.pathname, rather than wrapping the entire Routes tree. Since AnimatePresence only tracks its direct children's keys, wrapping Routes itself would remount the whole layout including shared nav or sidebar on every navigation; wrapping just the outlet content keeps that layout mounted while animating page transitions. daily.dev helps developers comparing React routing and animation patterns stay on top of implementation details."}}]}
```

