r/reactjs • • 18d ago

Discussion Is there a resource showing best practices for Motion animation?

Hopefully this makes sense, and apologies if I'm in the wrong subreddit.

I'm looking to improve at Motion and CSS animations, and am wondering if there are any resources that detail common animation practices for web components.

For instance, when animating a button, it's common to move it slightly on the Y axis, and adjust it's scale with a dampened spring.

If you know where I can find out more, I'd greatly appreciate it. Thanks

12 Upvotes

11 comments sorted by

2

u/brass_compass_sky 18d ago

check out the official Motion documentation on their site, it has a dedicated section called Best Practices that covers exactly what you are asking about.

1

u/BiggerBadgers 18d ago

Perfect, I’ll give it a look

1

u/musHeaer 16d ago

seconding this, the interactive examples in that section make it click pretty fast.

1

u/BiggerBadgers 18d ago

Would love some recommendations

1

u/Jazzlike-Web-3695 16d ago

for the button case specifically, try scale 0.97 on press instead of moving it on y. feels more physical and doesn’t shift anything around it. general rules i follow: ease-out for things entering, 150-250ms, only animate transform and opacity, and skip animation on stuff people use 100 times a day. emil kowalski’s blog (and animations.dev) is the best resource on this imo, also rauno’s “invisible details of interaction design”. happy to help and my DM's are open in case you need any help!

1

u/BiggerBadgers 16d ago

Thank you so much, this is great. I’ll check it all out

1

u/GeekyAntsBFSI 17d ago

Check out animations.dev for timing, easing, and springs, alongside Motion’s free docs. For buttons, start with subtle press feedback, then test rapid clicks and interrupted animations. Respect reduced-motion preferences too.

1

u/SoftwareNegative8783 15d ago

For button animation, use a spring with a bit of damping, and only animate transform and opacity. Those stay smooth. Also keep the movement small, like 2 to 4 pixels, and respect prefers-reduced-motion for users who turn motion off.