react-lazyload-img
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

react-lazyload-img

lazyload image component

Installation

$ npm install react-lazyload-img --save

Usage

import * as React from 'react';
import LazyLoadImg from 'react-lazyload-img';
 
class App extends React.Component<any, any> {
  render() {
    <div>
      <LazyLoadImg
      src=""
      placeholder=""       
      />
    </div>
  }
}

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

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i react-lazyload-img

Weekly Downloads

2

Version

1.0.3

License

MIT

Last publish

Collaborators

  • infeng