skip to content

Intersect

Emits events with intersection data.

DRAFT! This element is in early development and is liable to change or possibly be replaced.

class
Intersect
extends
Base
tag
<intersect-blam>
see

Props

name type default description
root string (the viewport)

CSS selector representing the scollable area containing the observed elements. Defaults to the viewport.

steps number 10

The granularity of intersection being observed. Where set to 10, 10 events are fired, each with a ratio between 0.1 and 1.

margin string 0

Alias for the standard rootMargin supplied to the observer settings. CSS value that must be a % or px value.

Events

type description
blam

Emitted whenever an intersection occurs, carrying the intersection ratio as x, on (is intersection happening?), and switch (whether the intersection status changed).

Examples

Examples that use the Intersect element: