Skip to content

React component: displays image placeholder before the required image has loaded

Notifications You must be signed in to change notification settings

AVVS/react-image-preloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Image Preloader

Pass image src and fallback src or data uri. Useful when you need to display image preloader in cases where src image might fail to resolve.

npm install react-image-preloader -S

Usage

React is a devDependency, so make sure you have react available in your project

Props:

  1. src: String (url or data-uri)
  2. fallback: String (url or data-uri)
  3. anonymous: Boolean
var React = require('react');
var ImagePreloaderComponent = require('react-image-preloader');

React.render(<ImagePreloaderComponent src='http://volatiledomain.com/src.png' fallback='http://example.com/fallback.png' />, document.body);

About

React component: displays image placeholder before the required image has loaded

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published