svecosystem / runed

Magical utilities for your Svelte applications (WIP)
https://runed.dev
MIT License
461 stars 23 forks source link

Feature Request: useIntersectionObserver #38

Closed sviripa closed 2 months ago

sviripa commented 4 months ago

Describe the feature in detail (code, mocks, or screenshots encouraged)

A utility function which provides a way to track visibility and position of a DOM element within the viewport or a container element. Under the hood it will use Intersection Observer API so it would expect to receive IntersectionObserver's root, margin, and threshold options and would return an instance of IntersectionObserverEntry

What type of pull request would this be?

None

Provide relevant links or additional information.

huntabyte commented 2 months ago

Closed by #73