motion icon indicating copy to clipboard operation
motion copied to clipboard

[BUG] AnimatePresence `popLayout` moves Elements down on exit when `bottom: 0`

Open domingasp opened this issue 5 months ago • 1 comments

Adding bottom: 0 as a style prop results in items shifting downwards on exit animation.

CodeSandbox

I've add exaggerated x moved on exit to showcase the problem better.

Steps to reproduce the behavior:

  1. Add bottom: 0 and AnimatePresence with mode popLayout.
  2. Remove items and notice they move downwards on exit.

https://github.com/user-attachments/assets/9185367d-19d9-4dfc-a6f6-957318761c60

Expected behavior

Item should correctly pop out of the layout and animate in place.

domingasp avatar Jul 22 '25 07:07 domingasp

Related https://github.com/motiondivision/motion/issues/2348

The problem is bottom, not the position type, fixed works fine if bottom removed

domingasp avatar Jul 22 '25 07:07 domingasp