solid-primitives icon indicating copy to clipboard operation
solid-primitives copied to clipboard

Extend `presence` to reach feature parity with `transition-group`

Open nonphoto opened this issue 1 year ago • 0 comments

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:

  1. Modes: parallel and in-out
  2. Callbacks for animation completion (instead of duration-based timeout)
  3. 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.

nonphoto avatar Jun 28 '23 22:06 nonphoto