dyno-img-react
v1.0.101
Published
a versatile react img component
Downloads
5
Maintainers
Readme
dyno-img-react
a versatile react img component set low quality image set high quality image lazy loading
Install
npm install --save dyno-img-react
Usage
import React, { Component } from 'react'
import DynoImg from 'dyno-img-react'
class Example extends Component {
render () {
return (
<DynoImg
src={"low-quality-img-url"}
srcHigh={"high-quality-img-url"}
alt={"alternate"}
// rootMargin defines the Margin around the root. The hq image will get loaded at the margin
rootMargin={"10%"}
/>
)
}
}
License
MIT © albseb511