Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 542 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 542 Bytes

react-image-component

React component to load images with a little finesse. A placeholder is rendered while the image loads. Once loaded the image fill fade in. See http://pugholdit.herokuapp.com for an example.

Installation

npm install --save react-image-component

Usage

const Image = require('react-image-component')

React.renderComponent(
  <Image
    src={'http://pugholdit.herokuapp.com/500x400.jpg'}
    transition={'opacity 0.6s ease'}
    aspectRatio={0.8}
  />,
  mountNode
)