DEV Community

Cover image for Making Magic in Framer Motion 2

Making Magic in Framer Motion 2

Seth Corker on March 28, 2020

This article has been updated to reflect API changes in Framer Motion 2.0.x Beta Framer Motion is my go-to animation library for React. Matt Perry...
Collapse
 
cedricgourville profile image
Cédric Gourville

Do you already use GSAP in react ? I currently use framer motion and I love it, I think it fits better than GSAP with react (Page transition really easy with Framer) but I never really give a shot to GSAP in react. Is it easy with Framer to implement a timeline ? and what about a 'children stagger' ?
Thx for your article !

Collapse
 
darthknoppix profile image
Seth Corker

I haven't used GSAP for a long time and never with React so I can't comment on that. I've had a lot of success with Pose and more recently Framer Motion. I'm not sure what you mean by a "timeline" but animating children is pretty easy, add staggerChildren to a parent <motion/> element. Perhaps I'll write another article with some other common cases and how to animate them with Framer Motion.

Collapse
 
cedricgourville profile image
Cédric Gourville

When I said timeline. I mean you can animate first this el, after this other el, you can start pause replay reverse that timeline.

greensock.com/docs/v3/GSAP/Timeline

Collapse
 
darthknoppix profile image
Seth Corker

To accompany this article, I've made a short run-through. This is using the updated codesandbox for Framer Motion Beta 42. Let me know if you have any questions.

If you're interested in more tutorial videos (including more long-form and step-by-step tutorials), subscribe to my channel.

Collapse
 
darthknoppix profile image
Seth Corker

Edit: This article has been updated to reflect API changes in Framer Motion 2.0.x Beta.
These changes include MagicMotion being renamed to AnimateSharedLayout and magicId becoming layoutId