1.0.1 • Published 4 years ago

rn-image-placeholder v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

rn-image-placeholder

Require

React-native >= 0.46.x

Installation

npm install --save rn-image-placeholder

Usage

import ImageLoader from 'rn-image-placeholder';

....

<ImageLoader
    style={{ width: 320, height: 250 }}
    loadingStyle={{ size: 'large', color: 'blue' }}
    source={{ uri: 'https://images.pexels.com/photos/5970/road-nature-forest-trees.jpg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940' }}
/>

Options

Supports all Image properties.

OptionDefaultInfo
placeholderSourcerequire('./img/img_empty.png')Show placeholderSource if the source can't be loaded or error.
loadingStylesize: 'small'; color: 'gray'Style ActivityIndicator
isShowActivitytrueShow ActivityIndicator loading
placeholderStyleStyle placeholder image
customImagePlaceholderDefaultStyleCustom style image placeholder default
borderRadiusBorder radius

License

ISC