Socket
Socket
Sign inDemoInstall

react-native-image-progress

Package Overview
Dependencies
1
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-image-progress

Progress indicator for networked images, supports progress bar and spinner


Version published
Maintainers
1
Install size
833 kB
Created

Readme

Source

react-native-image-progress

Progress indicator for networked images in React Native

NOTE: This module requires React Native 0.9+

Installation

npm install --save react-native-image-progress

Usage

var Image = require('react-native-image-progress');
<Image 
  source={{ uri: 'http://loremflickr.com/640/480/dog' }} 
  indicator='bar' 
  style={{
    width: 320, 
    height: 240, 
  }}/>

Properties

Any Image property and the following:

PropDescriptionDefault
indicatorStyle of the indicator, can be bar or spinnerbar
renderIndicator(progress)Function to render your own custom indicator, the progress argument is a number between 0 and 1None
colorColor of the indicator.#333 for bar, gray for spinner
backgroundColorColor of the background (only applies to bar)rgba(255, 255, 255, 0.5)

Note: onLoad* events are bubbled up, so if you wan't to do some custom thing when the image is loaded for example.

Demo

demo

Example

Check full example in the Example folder.

Todo

  • Progress bar indicator
  • Circular loading indicator
  • Animate progress
  • Optionally fade in images on completion

License

MIT License. © Joel Arvidsson

Keywords

FAQs

Last updated on 15 Oct 2015

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc