Animating to/from CSS Variables / Flickering on exit #2620
-
Hi, can someone figure out what the issue is with this exit animation? <AnimatePresence>
{show && (
<motion.div
initial={{ y: 'var(--from-y)' }}
animate={{ y: 'var(--to-y)' }}
exit={{ y: 'var(--from-y)' }}
transition={{ duration: 5 }}
>
Jumping on exit
</motion.div>
)}
</AnimatePresence> Code: |
Beta Was this translation helpful? Give feedback.
Answered by
MarkusWendorf
Apr 13, 2024
Replies: 1 comment
-
Had to include the unit in the properties. Changed |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MarkusWendorf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Had to include the unit in the properties. Changed
100
to100px
.