You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-lazysizes

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-lazysizes

LazySizes component base on lazysizes plugin.

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
11
-67.65%
Maintainers
1
Weekly downloads
 
Created
Source

React LazySizes

LazySizes component for ReactJS base on lazysizes

Installation

NPM

npm install --save react-lazysizes

Bower

bower install --save react-lazysizes

Usage

JS

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

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

UMD

<script src="path/to/react-lazysizes/dist/react-lazysizes.js"></script>
//...
var LazySizes = window.ReactLazysizes;
//...

Example here

Props

NameTypeDefault
srcstring'data:image/gif;base64,R0lGODdhEAAJAIAAAMLCwsLCwiwAAAAAEAAJAAACCoSPqcvtD6OclBUAOw=='
dataSrcstring
dataSizesstring'auto'
dataSrcSet[string, object, array]
classNamestring''
iframeboolfalse

More info see lazysizes api.

Example

View demo or example folder.

Keywords

react-component

FAQs

Package last updated on 17 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts