react-loadable-image
v1.2.2
Published
React component that tries to load image from the list and renders the first successfully loaded one
Downloads
446
Readme
react-loadable-image
Installation
yarn add react-loadable-image
or
npm install --save react-loadable-image
Usage
import Image from 'react-loadable-image';
const Example = ({ images }) => (
<Image
className="photo"
sources={images}
placeholder={<div className="placeholder" />}
/>
)
API
| Prop | Type | Description | | ------------| -------- | ------------------------------ | | className | string | Component className | | title | string | Image alt text | | sources | string[] | Images list | | placeholder | node | Renders while image not loaded |