Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching from @react-spring/web to framer-motion #2214

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

benjaminleonard
Copy link
Contributor

@benjaminleonard benjaminleonard commented May 1, 2024

These libraries are very similar, but in places I prefer the framer-motion API. One such case is that you can provide it an apple style duration and bounce and still get a spring animation but without needing to contort your brain with friction, mass etc.

framer-motion does have a much bigger bundle but you can keep it down by excluding the features we don't need. The layout features in particular are very powerful but we don't do any big native style transitions to make its inclusion justifiable.

`framer-motion`
dist/assets/app-ODvCp2jt.css                                140.78 kB │ gzip:  21.78 kB
dist/assets/app-DSIP2Da4.js                               1,124.33 kB │ gzip: 349.94 kB │ map: 5,436.95 kB

`react-spring`
dist/assets/app-zFe_5Sh-.css                                138.96 kB │ gzip:  21.43 kB
dist/assets/app-CT1MsEJt.js                               1,100.80 kB │ gzip: 344.06 kB │ map: 5,243.37 kB

WIP as I might find a few other spots where we might include animation.

Copy link

vercel bot commented May 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview May 1, 2024 1:56pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant