Animating between variants on scroll in Framer
In this Framer tutorial, you will learn Animating between variants on scroll in Framer. We explain a practical workflow, highlight the key settings that affect the result, and show how to apply the technique on real pages for cleaner UX and better site performance.
How do I animate between component variants based on scroll position in Framer?
To animate between component variants based on scroll position, first create multiple variants within your component. Then, add a Scroll Variant effect to the component. You’ll need to define scroll sections on your page (for example, by adding a scroll section to each text block). In the Scroll Variant effect, map each section to a specific variant. As visitors scroll and each section reaches a defined point in the viewport (like the center), the corresponding variant will be triggered, creating smooth transitions.
What is the purpose of using sticky positioning when animating scroll variants?
When you animate with scroll variants in Framer, you often use sticky positioning to anchor a component in view while the rest of the page scrolls. For example, you might set an iPhone mockup frame to “sticky” so it remains visible as you scroll. Inside this sticky frame you define scroll-sections that act as triggers: each trigger frame enters view and switches the mockup’s component variant. This way the mockup stays anchored while its state changes according to the scroll position, and you don’t need a separate section for every text block.
How can I troubleshoot timing issues when triggering variant changes on scroll?
If the variant changes are not happening at the desired moment, adjust the trigger point in the Scroll Variant effect (for example, from ’top’ to ’center’ of the viewport). You can also temporarily add a fill with reduced opacity to your scroll sections to visualize where each section starts and ends, helping you see exactly when the variant switch is triggered as you scroll.

Lesson details





