use-in-viewport
Detects if element is visible in the viewport
Source
Docs
PackageIcon
Usage
The use-in-viewport hook is a simpler alternative to use-intersection that only checks if the element
is visible in the viewport:
Scroll to see box
A box
Definition
Exported types
The UseInViewportReturnValue type is exported from the @mantine/hooks package;
you can import it in your application: