This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Francisco Inchauste
Posted Nov 03 - Read on Facebook

Looking for some reference code that shows how you detect the scroll direction and trigger an animation based on that? Thanks.


Ed Chao

If you are scrolling by dragging, on Events.DragEnd set a variable to hold the events.clientY value and use Utils.delay 0.1 to then set a comparison value in the same way. Subtract the first value from the second, and you'll know the direction if it's negative or positive.

John Anthony Evans

From your description it sounds like you want to use a combination of Events.DragMove and each time that it's fired use Calculate velocity.

Francisco Inchauste

I was using the scroll with no dragging, but maybe it's easier to use drag to detect this. Thanks for the help.

Read the entire post on Facebook