Use in View components

Use In View

A hook to check if an element is in view

Scroll down to see the elements change

Element 1 is not in view

Default options

Element 2 is not in view

With threshold: 0.5

Element 3 is not in view

With rootMargin: 100px

Scroll down to see the elements change

Variants list