Feb 27, 2021
I am guessing here that you have coupled the animation and the state change. The animation and the state should be separated. CSS animations are very good in that sense as they can be interrupted and still look good. If you stop them midway and animate them back they will not flicker.