README
React Lazy Img
Install
npm install --save react-lazy-loading-image
Usage
import * as React from 'react'
import MyComponent from 'react-lazy-loading-image'
class Example extends React.Component {
render () {
return (
<MyComponent src={}/>
)
}
}
API
LazyImg
Image component working similar with standard img
tag and with the following props.
Prop | Type | Required | Description |
---|---|---|---|
src |
string | ✓ | The image source |
lazy |
boolean | Set lazy image | |
id |
string | Element Id | |
className |
string | Element Class Name | |
alt |
string | Image alt | |
sizes |
any | Image default sizes | |
srcset |
string | Image srcset | |
style |
object | Element Inline Style | |
height |
number | Image Default height | |
width |
number | Image Default width | |
border |
string | Image Default border |
License
MIT © :mouse:snyung