Add Intersection Observer component to the Utilities Category (#1837)

This commit is contained in:
Patrick McDougle
2025-12-02 10:29:04 -06:00
committed by GitHub
parent 8ae90ef2b2
commit c0ced13f06

View File

@@ -2,6 +2,7 @@
title: Intersection Observer title: Intersection Observer
description: Tracks immediate child elements and fires events as they move in and out of view. description: Tracks immediate child elements and fires events as they move in and out of view.
layout: component layout: component
category: Utilities
--- ---
This component leverages the [IntersectionObserver API](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver) to track when its direct children enter or leave a designated root element. The `wa-intersect` event fires whenever elements cross the visibility threshold. This component leverages the [IntersectionObserver API](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver) to track when its direct children enter or leave a designated root element. The `wa-intersect` event fires whenever elements cross the visibility threshold.