motion icon indicating copy to clipboard operation
motion copied to clipboard

[FEATURE] Layout Projection for Vanilla JS!?

Open Char2sGu opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

Hi Motion community! Hello Matt Perry!

I'm Charles, sophomore student at Northeastern University, open-source enthusiast! I'm not a React developer, but I'm a really huge fan of Framer Motion, especially the part about original fascinating Layout Projection technique! I love it so much that I almost changed my framework to React solely because I really wanted to use Framer Motion.

However, eventually I decided to get myself some challenge by diving into how Layout Projection really works and trying to port this technology to Vanilla JS. And that is how this https://github.com/Char2sGu/layout-projection project comes from! This project is a rough implementation of Layout Projection, which works, although not as good as Framer Motion, and currently serves as underlying animation engine powering my favourite project Reply: https://reply.char2s.dev/.

I just surprisingly noticed that framer.com/motion is now motion.dev, and it seems like motion.dev aims to be an animation library that faces both React and Vanilla JS ecosystems! I was just curious if it is planned for motion.dev to implement Layout Projection for Vanilla JS? If that is the plan, I would really love to help with that! I have experience developing various open-source libraries, and making Layout Projection available for everyone is also one of my biggest goals!

Describe the solution you'd like

Implement Layout Projection for vanilla JS!

Describe alternatives you've considered

Hmmm Ask everyone to use React I guess..?

Additional context N/A

FAQs

Does Motion support Preact?

It might work with Preact, but we don't explicitly support it, so if it does currently work you'd be using it at your own risk.

Char2sGu avatar Nov 17 '24 05:11 Char2sGu

Would love to see this as well! Using Solid.js and would love to have support for layout and layoutId props or data attributes for automatically interpolating transitions between layouts.

ricardonunez-io avatar Dec 31 '24 00:12 ricardonunez-io

Closing this out as animateView is our immediate direction for the JS library

mattgperry avatar Apr 16 '25 11:04 mattgperry

I'd ask you to politely reconsider, the View Transitions API creates really terrible user experiences a lot of the time, due to its non-interruptability. The first example shown on the animateView page, the switch one, feels terrible if you click it quickly. It would be awesome if the system that Motion for React and Vue uses was available for vanilla JS, so it could be brought to other frameworks, instead of forcing people to either use View Transitions and look pretty, or do no animations and feel good for the user.

andylovescode avatar Aug 28 '25 06:08 andylovescode