VanillaJS plugin for detecting if an element is on the screen.
Features:
- Built with IntersectionObserver
- Allows you to define from which side the element enters or leaves
- Allows you to define the limit of enters or leaves
- Defines a threshold for the percentage of the target's visibility
npm i @lemehovskiy/is-on-screen
If you'd like to get involved, please consider opening an issue or submitting a pull request. Your input is highly valued, and I'm enthusiastic about collaborating to enhance this tool.
is-on-screen is released under the MIT License. See the LICENSE file for comprehensive details regarding the terms and conditions of use.