I may have missed it in the documentation, but I wonder if there is the possibility to start an animation once an element is visible in the viewport (animate on scroll).
Thanks!
You'd use an intersection observer to trigger the animation, once the element enters view.
https://github.com/thebuilder/react-intersection-observer
Have a recipe here (using react-spring, but same principal):
https://github.com/thebuilder/react-intersection-observer/blob/master/docs/Recipes.md#trigger-animations
@thebuilder wow, that's exactly what I was looking for!
using react-spring, but same principal
Looks like this was even converted over to framer-motion, nice surprise :)
Most helpful comment
You'd use an intersection observer to trigger the animation, once the element enters view.
https://github.com/thebuilder/react-intersection-observer
Have a recipe here (using react-spring, but same principal):
https://github.com/thebuilder/react-intersection-observer/blob/master/docs/Recipes.md#trigger-animations