项目作者: infeng

项目描述 :
lazyload image component
高级语言: JavaScript
项目地址: git://github.com/infeng/react-lazyload-img.git
创建时间: 2016-10-11T08:34:18Z
项目社区:https://github.com/infeng/react-lazyload-img

开源协议:MIT License

下载


react-lazyload-img

lazyload image component

Installation

  1. npm install react-lazyload-img --save

Usage

  1. import * as React from 'react';
  2. import LazyLoadImg from 'react-lazyload-img';
  3. class App extends React.Component<any, any> {
  4. render() {
  5. <div>
  6. <LazyLoadImg
  7. src=""
  8. placeholder=""
  9. ></LazyLoadImg>
  10. </div>
  11. }
  12. }

Props

props type default description required
src string img source false
placeholder string when img unload, img`s source is placeholder false
offset {{ min?: number, max?: number }} { min: 0, max: 0 } viewport offset false
img tag attributes any - img tag attributes false

License

MIT