Add optional custom intersection root element in intersect plugin #2914
jannisborgers
started this conversation in
3. Feature Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Intersection observer lets us provide an element as the intersection root. If I understand the plugin code correctly, the root is not explicitely set by the plugin, which lets the observer select the viewport as the intersection root.
Providing an optional
root
key in the options object and letting us pass an element to it (possibly via a new Alpine attribute on the container, or as a$ref
?) would make this possible.Beta Was this translation helpful? Give feedback.
All reactions