1.2.0 • Published 5 years ago

react-native-busy-activity-indicator v1.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

React-Native Busy Indicator

Install

npm install react-native-busy-activity-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-activity-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-activity-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

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