motiondivision / motion

A modern animation library for React and JavaScript
https://motion.dev
MIT License
25.66k stars 842 forks source link

Svelte 5 Wrapper Support #2895

Open epavanello opened 3 days ago

epavanello commented 3 days ago

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

Now that vanilla JS APIs are available, it would be great to have native support for Svelte 5.

Describe the solution you'd like

An official Svelte 5 wrapper that integrates smoothly with the Runes API.

Describe alternatives you've considered

Using vanilla Motion.dev in Svelte projects, but it lacks reactivity and feels less integrated.

Additional context

Svelte’s reactive model could pair well with Motion.dev, enhancing the developer experience.

epavanello commented 3 days ago

I just created a repo to experiment with the possibility of wrapping motion apis in svelte https://github.com/epavanello/motion-svelte

targetlucked69 commented 2 days ago

Since youre asking for Svelte support, might as well ask for

  1. Vue
  2. Solid
  3. Angular
  4. Preact
  5. Lit
  6. Yada yada

Nope @mattgperry, please let the community create wrappers themselves so you can focus on the React and Vanilla APIs <3

GLHF! This is gonna be a mess to maintain tbf.

epavanello commented 2 days ago

I just completed a first minimal build with ssr and runes support. I will push the changes to the repo and the npm package soon

epavanello commented 2 days ago

Here the first demo and the repo

https://motion-svelte.vercel.app/ https://github.com/epavanello/motion-svelte