progressive-image-react
v1.0.1
Published
Progressive image loader component for React
Downloads
4
Maintainers
Readme
progressive-image-react
A react component for lazy-loading images.
Installation
To use this component, you should install it by npm:
npm install progressive-image-react --save-dev
Usage
<ImageLoader className="yourclassname" previewSrc={previewImageSrc} imageSrc={imageSrc} onClick{yourFunc} />
Props description
- previewSrc*: source of preview image (preview is shown while theactual image is being loaded).
- imageSrc*: source of actual image
- onClick: method called on click of the image
Props marked with (*) are required.
License
This software is released under the MIT License.
Acknowledgments
Inspired by progressive-image.js. Thanks and kudos to Craig Bucker.