IIntersectionObserverInit

interface
Observers & Events

Typed options bag for configuring an IntersectionObserver — mirrors the native IntersectionObserverInit with nullable root and flexible threshold.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

root
Element | Document | null
The element used as the viewport for checking visibility. Defaults to the browser viewport when null or omitted.
rootMargin
string
CSS margin around the root applied before computing intersections, e.g. "10px 0px".
threshold
number | Array<number>
Single ratio or list of ratios at which the observer callback fires. Defaults to 0.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Passing options to OrigamLazy

html