Skip to content

React component that renders children elements when they enter the viewport.

License

Notifications You must be signed in to change notification settings

pkibbey/react-lazy-load

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Lazy Load Component

Really simple component that renders children elements when they enter the viewport.

Install

npm install --save react-lazy-load

Usage

var React = require('react');

var LazyLoad = require('react-lazy-load')


// In your render

return (
    <LazyLoad>
        <div>some content</div>
    </LazyLoad>;
)

Props

height="String"

This is used to set the elements height even when it contains no content.

<LazyLoad height='100px'>
    <div>some content</div>
</LazyLoad>;

About

React component that renders children elements when they enter the viewport.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 50.2%
  • JavaScript 46.5%
  • CSS 3.3%