2.0.3 • Published 6 years ago

react-fade-image v2.0.3

Weekly downloads
12
License
MIT
Repository
github
Last release
6 years ago

react-fade-image

Little demo with Storybook here Simple react lazy fade image component. The image loads when it's in viewport by listening to scroll event (with throttled function every 200ms) The Obstruction of the image is precalculate thanks to the padding bottom trick

Usage

Install via package manager

npm install react-fade-image --save
OR
yarn add react-fade-image
import FadeImage from 'react-fade-image';
<FadeImage width={640} height={480} src='https://placeimg.com/640/480/animals' />
<FadeImage width={640} height={480} src='https://placeimg.com/640/480/animals' loaderComponent={<div>Loading...</div>}/>
<FadeImage ratio='16:9' src='https://placeimg.com/640/320/animals/sepia' />

Contribute :)

  • yarn
  • npm run build
  • npm run test:watch
2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago