1.0.3 • Published 2 years ago

lazy-load-kle v1.0.3

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

lazy-load-kle

lazy load img with intersectionObserver

NPM JavaScript Style Guide

Install

npm install --save lazy-load-kle

Usage

import React, { Component } from 'react'

import{ LazyLoad , LazyEarly } from 'lazy-load-kle'

class Example extends Component {
  render() {
    return <LazyLoad src='link of img' alt='alt' placeholder='link placeholder image' className='add some class for img'/>
    <!-- Load when image in screen -->
    <LazyEarly src='link of img' alt='alt' placeholder='link placeholder image' className='add some class for img' early={value(2300)}/>
    <!-- Load when image margin = early (default = 200px) -->
  }
}

License

MIT © phamqi

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago