0.2.2 • Published 7 years ago

react-blur-image-loader v0.2.2

Weekly downloads
41
License
MIT
Repository
github
Last release
7 years ago

react-blur-image-loader

Progressive Image Loading for React.

npm.io

Setup

  1. Install
npm install react-blur-image-loader react react-dom -S
  1. Usage
import {render} from 'react-dom';
import BlurImageLoader from 'react-blur-image-loader';

render(<BlurImageLoader src={"picture.jpg"} 
                        preview={"tiny-picture.jpg"} 
                        fullCover={true}
                        maxBlurLevel={10}
                        transitionTime={400}/>, document.getElementById("root"));
  1. Props
PropNameTypeDefault ValueDescription
srcstringNullThis field is REQUIRED, it specifies the final image url
previewstring""Specifies a preview image url, a preview image should be a tiny optimized image, it will be present until final image loaded, if preview is not defined, a spin loader would be present until final image loaded.
fullCoverboolfalseSpecifies whether image should cover its parent area or contain inside.
maxBlurLevelnumber10Specifies the level of Gaussian blur, refer to stdDeviation.
transitionTimenumber400Specifies the transition time from blur to clear, default value is 400ms.
loaderReact.Element<DefaultLoader />Specifies the preview loader
0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago