You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the same keyframes sequence for opacity in different variants only animates on the first render. Also, the opacity stays at the last value in the next renders.
Click on "X" Button to toggle state (& fire animation)
See problem
Expected behavior
The box should go from opacity: 0 to opacity: 1 on every click.
Changing the other keyframe to another value with a little difference works correctly: [0, 1] for both variants => animaties on initial render and stays on 1 [0, 1] for one and [0, 1.01] for another => works correctly
Using the same keyframes sequence for opacity in different variants only animates on the first render. Also, the opacity stays at the last value in the next renders.
https://codesandbox.io/s/angry-raman-bc9sf?file=/src/App.js
Steps to reproduce the behavior:
Expected behavior
The box should go from
opacity: 0
toopacity: 1
on every click.Changing the other keyframe to another value with a little difference works correctly:
[0, 1]
for both variants => animaties on initial render and stays on 1[0, 1]
for one and[0, 1.01
] for another => works correctlyQuestion on Stackoverflow:
https://stackoverflow.com/questions/69887735/framer-motion-opacity-keyframe-only-animates-on-initial-render
The text was updated successfully, but these errors were encountered: