@huyhq_syn/lazyload-observer
v1.0.0
Published
A custom lazy loading library using IntersectionObserver
Downloads
71
Maintainers
Readme
LazyLoad Package
A simple library for lazy loading images using the Intersection Observer API.
Installation
You can install the package via npm:
npm install lazyload-package
import LazyLoad from 'lazyload-package';
const customObserver = new LazyLoad({
root: document.querySelector('#scrollArea'), // Custom scroll area
rootMargin: '10px', // Custom margin
threshold: 0.5, // Custom threshold
});