# Intersection Observer API Confidence: high Last verified: 2026-05-22 Generation: human_only ## TL;DR The Intersection Observer API asynchronously observes changes in the visibility of target elements relative to an ancestor viewport. It enables efficient lazy loading, infinite scroll, and visibility-based analytics without polling scroll events. ## Core Explanation Usage: `new IntersectionObserver(callback, { threshold: 0.1 })`. The callback receives entries with `isIntersecting` and `intersectionRatio`. Multiple thresholds enable graduated visibility detection. `rootMargin` expands/shrinks the observation area. Intersection Observer runs off the main thread and is dramatically more performant than scroll event handlers. ## Further Reading - [Intersection Observer (W3C)](https://www.w3.org/TR/intersection-observer/)