1.0.3 • Published 6 years ago

react-progressive-component v1.0.3

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

react-progressive-component

license

Example

Installation

$ npm install react-progressive-component --save (or yarn add ...)

Usage

Div

<ProgressiveImg
  src={pic1}
  loader={small_pic1}
  loaderStyle={'min-width: 100vw;height: 100vh;'}
>
    <div
      style={{
        minWidth: '100vw', height: '100vh',
        background: `url(${pic1}) center center / cover no-repeat`
      }}
    />
</ProgressiveImg>

Img

<ProgressiveImg
  src={pic2}
  loader={small_pic2}
  loaderStyle={'width: 100vw'}
>
  <img
    src={pic2}
    style={{ width: '100vw' }}
  />
</ProgressiveImg>

Property

PropTypeRequiredDefaultDescription
srcstringyes------Origin image
loaderstringyes------Compress image
loaderStylestringoptionfilter: blur(10px);The style of the loader.

CONTRIBUTING

All contributions and stars are super welcome! Please feel free to pull request.

LICENSE

MIT

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.1.0

7 years ago