react-lazyload-img
lazyload image component
Installation
$ npm install react-lazyload-img --save
Usage
;; Component<any any> { <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