I have a scenario where the container changes its position from fixed to relative, during scrolling. I have used framer-motion to give a smooth effect during position transitioning. framer-motion is a great library to handle these scenarios, however my code is not working as expected in all browsers. When I scroll to the offset where the position changes from fixed to relative, it jumps and sits in the place, where as am expecting it should be smooth.
I have a scenario where the container changes its position from fixed to relative, during scrolling. I have used framer-motion to give a smooth effect during position transitioning. framer-motion is a great library to handle these scenarios, however my code is not working as expected in all browsers. When I scroll to the offset where the position changes from fixed to relative, it jumps and sits in the place, where as am expecting it should be smooth.
Share Improve this question edited Jul 27, 2020 at 19:20 user12133234 asked Jul 27, 2020 at 17:14 user12133234user12133234 4112 gold badges7 silver badges15 bronze badges1 Answer
Reset to default 3You should add "layout" prop to the ponent you are animating. You can read more about it in the docs