react-progressive-image-loading
TypeScript icon, indicating that this package has built-in type declarations

3.0.3 • Public • Published

React Progressive Image Loading

Progressively load images using a blur effect.

CircleCI npm version

example

Installation

$ npm install react-progressive-image-loading --save

Import

import ProgressiveImage from "react-progressive-image-loading";

Usage

<ProgressiveImage
    preview="/images/tiny-preview.png"
    src="/images/preview.png"
    render={(src, style) => <img src={src} style={style} />}
/>

Instead of using the img tag, you can use background-image with a div.

<ProgressiveImage
    preview="/images/tiny-preview.png"
    src="/images/preview.png"
    render={(src, style) => <div style={Object.assign(style, { backgroundImage: `url(${src})` })} />}
/>

You can also customize the transition time and the timing function used for that transition.

<ProgressiveImage
    preview="/images/tiny-preview.png"
    src="/images/preview.png"
    transitionTime={500}
    transitionFunction="ease"
    render={(src, style) => <img src={src} style={style} />}
/>

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.3264latest

Version History

VersionDownloads (Last 7 Days)Published
3.0.3264
3.0.21
3.0.10
3.0.00
2.0.30
2.0.20
2.0.10
2.0.00
1.1.00
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i react-progressive-image-loading

Weekly Downloads

265

Version

3.0.3

License

Apache-2.0

Unpacked Size

18.1 kB

Total Files

8

Last publish

Collaborators

  • wcandillon