New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-image-placeholder

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-image-placeholder

react native image placeholder

1.0.8
Source
npm
Version published
Weekly downloads
947
13.41%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-image-placeholder npm version

NPM

  • Support Android and iOS.
  • The image component that supports shows placeholderSource when load image network.
  • Show placeholderSource if the main source can't be loaded or error.
  • Support custom ActivityIndicator loading.

Sample

Installation

npm i --save react-native-image-placeholder

Please file an issue if you have any trouble!

Usage

import ImageLoad from 'react-native-image-placeholder';

....

<ImageLoad
    style={{ width: 320, height: 250 }}
    loadingStyle={{ size: 'large', color: 'blue' }}
    source={{ uri: 'https://4.bp.blogspot.com/-lYq2CzKT12k/VVR_atacIWI/AAAAAAABiwk/ZDXJa9dhUh8/s0/Convict_Lake_Autumn_View_uhd.jpg' }}
/>

Options

Supports all Image properties.

OptionDefaultInfo
placeholderSourcerequire('./Images/empty-image.png')Show placeholderSource if the source can't be loaded or error.
loadingStylesize: 'small'; color: 'gray'Style ActivityIndicator
isShowActivitytrueShow ActivityIndicator loading
placeholderStyleStyle placeholder image

License

ISC

Keywords

react native image placeholder

FAQs

Package last updated on 01 Jul 2017

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