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

What is Framer? Join the Community
Return to index
Matt Marriotti
Posted May 02 - Read on Facebook

Is there a way to detect when you reach the bottom of a scrolling container? I want to trigger an event to expand a component which is outside of the scrolling container, but need to know when the user has reached the bottom of the container.


Benjamin Den Boer

Hey Matt Marriotti - you can compare the current scrollY with the scroll.content.height (minus the Screen height). In the Swipe 'n Scroll prototype I made a while back I did something similar, and also stored it in a variable to use as a flag later on. You can use the following snippet in a dragging/scrolling event, depending on your project:

# Detect if we're at the bottom of the page
bottomOfPage = scroll.scrollY > (scroll.content.height - Screen.height)
endAnimation = if bottomOfPage then true else false

Read the entire post on Facebook