Skip to content

[RAC/GridList] framer-motion enter animations not working #8123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jeffijoe opened this issue Apr 21, 2025 · 0 comments
Open

[RAC/GridList] framer-motion enter animations not working #8123

jeffijoe opened this issue Apr 21, 2025 · 0 comments

Comments

@jeffijoe
Copy link
Contributor

Provide a general summary of the issue here

When using <AnimatePresence> with a <GridList>, the items do not animate in as expected.

🤔 Expected Behavior?

Animations should work the same as if using regular HTML elements

😯 Current Behavior

enter animations do not play, they're stuck in their starting state

animations-broken-encoded.mp4

💁 Possible Solution

Not a solution, but it can be partially worked around by applying the animations to a child of the GridListItem, however, when doing so the initial={false} is not respected on AnimatePresence.

I suspect the reason, at least for the issue with the workaround where initial={false} isn't respected, is due to how collections work in React Aria; the items probably aren't rendered in the first render, and when they do render, it won't be the initial one.

🔦 Context

We're trying to animate list items.

🖥️ Steps to Reproduce

I've reproduced this with the latest versions of all packages here: https://codesandbox.io/p/sandbox/condescending-fog-3vkgjk

Version

RAC 1.8.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

macOS

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant