Skip to content

Animate Persence inconsistencies with Framer Motion API #2

@Omicrxn

Description

@Omicrxn

First and foremost, nice work forking svelte-motion because it's such a needed library in the svelte ecosystem but the lack of maintenance is horrible.

One thing I'm noticing on the Animate Presence is that the API built on the original library is quite different over Framer Motion's. I understand things like why the list is done, even though maybe it is more friendlier to let the developers put the key's themselves, with Svelte syntax like in react. However I don't know the internals so this is not really a big problem. However there is a property exitBeforeEnter which I guess it mimicks the mode="wait" of Framer Motion. I think we should copy the API's and also add the lacking mode="popLayout".

Finally there is a bug where setting initial={false} which is supposed to only remove the first render initial animation, but instead it removes all initial animations that follow.

Overall I think keeping a close syntax to Framer Motion would help to translate examples found in react, or even developers transitioning from Framer.

Thanks for the great work!

PD: I'm using Svelte 5, maybe the bug about initials is due to that, haven't tested it on Svelte 4.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions