1.3.0 • Published 3 years ago

lazy-image-reactjs v1.3.0

Weekly downloads
2
License
ISC
Repository
github
Last release
3 years ago

React Image Lazy Load

Description

This package created for the lazy loading images

  • Lazy-loading of images or other content as a page is scrolled.
  • Implementing "infinite scrolling" web sites, where more and more content is loaded and rendered as you scroll, so that the user doesn't have to flip through pages.
  • Deciding whether or not to perform tasks or animation processes based on whether or not the user will see the result.
  • dataSrc attribute allows you to display a placeholder image before displaying a real image
import LazyImage from 'lazy-image-reactjs';

// By default used this options for IntersectionObserver
const options = {
  threshold: 0.01,
  rootMargin: '75%',
}

function App() {
  return (
    <div>
      <LazyImage
        alt="alt"
        src="image.jpg"
        dataSrc="alt.img"
        options={options}
      />
    </div>
  );
}

You can play with it in sandbox

1.3.0

3 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.1.0

4 years ago