@fenderdigital/image-lazy-loader
v0.1.1
Published
Fender React UI Kit ImageLazyLoader Component
Downloads
3
Readme
ImageLazyLoader for Fender React UI Kit
Description
A class for lazy loading images via the IntersectionObserver API.
Installation and Usage
yarn add @fenderdigital/image-lazy-loader --save
import ImageLazyLoader from '@fenderdigital/react-image-lazy-loader';
const imageLazyLoader = new ImageLazyLoader();
imageLazyLoader.init();
<img
class="lazy-load"
data-src="foo.jpg"
data-srcset="foo.jpg 1x, [email protected] 2x"
/>;
Development
Check the Monorepo README for development documentation.