https://github.com/infeng/react-lazyload-img
lazyload image component
https://github.com/infeng/react-lazyload-img
image lazyload react
Last synced: about 1 year ago
JSON representation
lazyload image component
- Host: GitHub
- URL: https://github.com/infeng/react-lazyload-img
- Owner: infeng
- License: mit
- Created: 2016-10-11T08:34:18.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-17T02:09:28.000Z (almost 10 years ago)
- Last Synced: 2025-06-18T08:53:38.423Z (about 1 year ago)
- Topics: image, lazyload, react
- Language: JavaScript
- Size: 11.7 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-lazyload-img
lazyload image component
## Installation
```bash
npm install react-lazyload-img --save
```
## Usage
```javascript
import * as React from 'react';
import LazyLoadImg from 'react-lazyload-img';
class App extends React.Component {
render() {
}
}
```
## 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