Hooks

useHasScrolled()

The useHasScrolled() hook returns a boolean indicating whether the user has scrolled past a given threshold, sourced from the scrollYProgress value provided by Motion. If the user hasn't scrolled or is at the top of the page, the hook returns false. This makes it super simple to make scroll based animations.

Unlock full documentation

This part of the documentation are for members only. Please upgrade your plan to unlock this section.

On this page