1.3.0 • Published 5 years ago

rc-lazyload-img v1.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

react lazy load(preview!!)

feature

  • it leverages intersetion-observer Api w3c
  • ligthweigth and flexible script
  • jsx
  • outbox
  • client & server

pr welcome !!

install

npm i rc-lazyload-img
# or yarn add -D rc-lazyload-img

usage | props | type | default | des |----------|:-------------:|---------------------------------:|------: | | src | string | 11 image(base64) | as small as possible | dataBGImg| string | '' | | | holder | string | 11 image(base64) img element | placeholder of imgElement(as small as possible) |...ImgHTMLAttributes| | |any(same as <img {...ImgHTMLAttributes}/>)|

   ...
  <LoadImg src='www.example.com/pic1.png' />
  <LoadImg dataBGImg="www.example.com/pic2.png" />
  <LoadImg 
    style={{styles}}
    dataBGImg="www.example.com/pic2.png" />
  <LoadImg 
    onError={handleOnError}
    dataBGImg="www.example.com/pic2.png" />
  ...
1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago