Primitives / foldkit-primitives/observers
Intersection
const · packages/primitives/src/observers/intersection.ts:17
const Intersection: Mount.MountDefinitionNoArgs<
'Intersection',
{
readonly _tag: 'IntersectionChanged'
readonly isIntersecting: boolean
readonly ratio: number
}
>Element visibility as a Mount: IntersectionObserver reports viewport crossings as Messages for the element carrying this Mount. No observer (SSR, old browser) emits nothing instead of throwing.
In the guides
- Find one by the jobPrimitives / foldkit-primitives
- The mapPrimitives / foldkit-primitives
- foldkit-primitives/observersPrimitives / Observers
- Start with one: an element's sizePrimitives / Observers