Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-visibility-sensor with IntersectionObserver #145

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

markuskr
Copy link

This is a first version of react-visibility-sensor using IntersectionObserver (https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).

I implemented a basic version and support for these properties:

  • partialVisible (as boolean, not as offset)
  • offset
  • containment

I think that we want to think how we can support minTopValue as partialVisible since I don't see a 1:1 mapping to the IntersectionObserver API.

This is not intended as a complete solution, merely as the starting point for a discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant