react-lazy-imager
The **imager** is used to replace <img> tag, and it will lazy to load the picture.
Last updated 4 months ago by abelce .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-lazy-imager 
SYNC missed versions from official npm registry.

React-Imager

The imager is used to replace tag, and it will lazy to load the picture.

Installation and usage

Install

npm install -S react-imager

Then use it in your app:

import React from 'react';
import Img from 'react-imager';

class App extends React.Component {

  successCallback(){

  }

  render() {
    return (
      <Img 
        src="./expamle.png" 
        thumbSrc="./thumb.png" 
        className="demo"/>
        onSuccess={this.successCallback}
    );
  }
}

Props

It has all the attributes of the <img> tag, such as:

  • src
  • style
  • className
  • alt
  • thumbSrc: display before the src is loaded
  • errorSrc: display while load src failed
  • onSuccess: callback after the image is successfully loaded
  • onFailed: callback after the image is failed loaded

License

MIT License

Keywords

react image lazyload img

Current Tags

  • 1.0.9                                ...           latest (4 months ago)

10 Versions

  • 1.0.9                                ...           4 months ago
  • 1.0.8                                ...           a year ago
  • 1.0.7                                ...           a year ago
  • 1.0.6                                ...           a year ago
  • 1.0.5                                ...           a year ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (4)
Dev Dependencies (15)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |