solidjs-motion

useAnimatePresence (hook)

Imperative escape hatch — exit() returns a Promise, await it before flipping mount.

"Save" runs the exit AND a fake 400ms network call in parallel. The card unmounts only after both settle — same shape every library-author uses for route transitions or async confirmation dialogs.

state: idle
Pending changes
Click "save" — I'll exit when both the animation and the (fake) network call settle.