solid-primitives
solid-primitives copied to clipboard
Extend `presence` to reach feature parity with `transition-group`
Describe The Problem To Be Solved
presence
is super helpful for transitioning between components without unmounting them. However, it is missing some features that are present in transition-group
despite being useful in the same scenarios, mainly:
- Modes:
parallel
andin-out
- Callbacks for animation completion (instead of duration-based timeout)
- List transitions
Suggest A Solution
Update createPresence
to match the API of createSwitchTransition
. Add an additional hook, createPresenceList
that matches the API of createListTransition
. I don't anticipate any major difficulty in this because the implementation should mirror that of transition-group
but I haven't looked into the source of either library too deeply yet.
I would be open to creating a PR for this as I will be building this functionality anyway as part of a private project.