1.0.101 • Published 4 years ago

dyno-img-react v1.0.101

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

dyno-img-react

a versatile react img component set low quality image set high quality image lazy loading

NPM JavaScript Style Guide

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