A React Hook that allows you to check if an element is visible in the viewport.
Scroll down on the dashed box to see the visibility status of the element.
See API for more details.
Click links below to view source on GitHub.
ElementTarget
is a union type that represents various kinds of elements that can be targeted.
See ElementTarget or ElementTarget Types for more details.
UseIntersectionObserverOptions
is options of useIntersectionObserver
, see useIntersectionObserver#options for more details.
A boolean
value that indicates if the target element is visible in the viewport.