This demo shows how the visibleRectEffect API tracks the
visible portion of an element with two different visibility ratios:
• Document Visibility: How much of the element is
visible in the browser viewport
•
Scroll Container Visibility: How much of the element is
visible within its scrollable parent
Instructions:
Scroll the page and watch how both ratios change. In custom container
mode, notice how scroll container visibility can be 100% while document
visibility is 0%.
Content above the target element
This is some content on the left side of the target element. It helps demonstrate how the overlay system works when the target is part of a more complex layout.
Additional content to make this section taller.
This is content on the right side of the target element. The flexbox layout ensures proper alignment while maintaining the overlay functionality.
More content to balance the layout.
Content below target element