layzily
v0.1.2
Published
A React component that supports lazy loading images using the IntersectionObserver API
Downloads
1
Maintainers
Readme
layzily
Usage
<Layzily
src="https://high-res-image.jpg"
alt="I'm lazy"
actual={({ imageProps }) => <img alt={imageProps.alt} {...imageProps} />}
fallback={({ imageProps, ref }) => <img ref={ref} alt={imageProps.alt} src="https://low-res-image.jpg" />}
/>