1.1.0 • Published 7 years ago

react-native-busy-indicator v1.1.0

Weekly downloads
30
License
MIT
Repository
github
Last release
7 years ago

React-Native Busy Indicator

npm version Circle CI NPM downloads

Install

npm install react-native-busy-indicator --save

Usage

Place the indicator component as close to the root as possible, outside your other view components

const BusyIndicator = require('react-native-busy-indicator');

const YourComponent = React.createClass({
  render() {
    return (
      <View>
        ...
        <BusyIndicator />
      </View>
    );
  }

Show / Hide loader

Toggling the component can be done from any file, provided the component has already been placed and rendered.

const loaderHandler = require('react-native-busy-indicator/LoaderHandler');

loaderHandler.showLoader("Loading"); // Show indicator with message 'Loading'
loaderHandler.showLoader("Loading More"); // Show indicator with message 'Loading More'

loaderHandler.hideLoader();  // Hide the loader

Component Properties

PropTypeDescription
colornumbercolor of the indicator. Default gray
overlayWidthnumberoverlay width
overlayHeightnumberoverlay height
overlayColorstringoverlay color
textstringtext. Default: Please wait...
textColorstringtext color
textFontSizenumbertext font size
textNumberOfLinesnumbertotal number of lines does not exceed this number. Default: 1
Sizesmall/largeSize of the spinner. Default: small

Demo

Demo

Note: The spinner moves much smoother than shown in recording!

1.1.0

7 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago