Skip to content

eriben/react-lazysizes

 
 

Repository files navigation

React LazySizes

LazySizes component for ReactJS base on lazysizes

Installation

npm install --save react-lazysizes

Usage

var LazySizes = require('react-lazysizes');

<LazySizes width='1920' height='1024' dataSrc='http://lorempixel.com/1920/1024/sports/1'/>

Props

Name Type Default
src string 'data:image/gif;base64,R0lGODdhEAAJAIAAAMLCwsLCwiwAAAAAEAAJAAACCoSPqcvtD6OclBUAOw=='
dataSrc string
dataSizes string 'auto'
dataSrcSet string
className string ''
iframe bool false
width string or number
height string or number

More info see lazysizes api.

Example

View demo or example folder.

About

LazySizes component for ReactJS base on lazysizes

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.0%
  • CSS 2.0%
  • HTML 1.0%