progressive-image-react
Version:
Progressive image loader component for React
39 lines (16 loc) • 908 B
Markdown
# 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]([https://github.com/craigbuckler/progressive-image.js](https://github.com/craigbuckler/progressive-image.js)). Thanks and kudos to [Craig Bucker]([https://github.com/craigbuckler](https://github.com/craigbuckler)).