Skip to content

UseIntersectionObserverOptions

Defined in: src/hooks/useIntersectionObserver/useIntersectionObserver.types.ts:3

Properties

enabled?

optional enabled: boolean

Defined in: src/hooks/useIntersectionObserver/useIntersectionObserver.types.ts:11

Disable the observer without unmounting the component.

Default

true

root?

optional root: Element | null

Defined in: src/hooks/useIntersectionObserver/useIntersectionObserver.types.ts:5

Root element. null (default) targets the viewport.


rootMargin?

optional rootMargin: string

Defined in: src/hooks/useIntersectionObserver/useIntersectionObserver.types.ts:7

Margin around the root, e.g. "0px 0px 200px 0px".


threshold?

optional threshold: number | number[]

Defined in: src/hooks/useIntersectionObserver/useIntersectionObserver.types.ts:9

Single threshold or an array of thresholds.