# react-native-modal-spinner

> A simple and fully customizable React Native component that implements a spinner UI.

Latest version **1.0.6** (published 2019-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-modal-spinner
pnpm add react-native-modal-spinner
yarn add react-native-modal-spinner
bun add react-native-modal-spinner
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2019-12-17 |
| First published | 2019-12-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 40.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ajay |
| Maintainers | ajay_g |
| Keywords | react-native, react-component, react-native-component, react, mobile, ios, android, ui, spinner, activity-indicator |

## Links

- npm: https://www.npmjs.com/package/react-native-modal-spinner
- Repository: https://github.com/Ajayg96/react-native-spinner
- Issues: https://github.com/Ajayg96/react-native-spinner/issues
- npm.io page: https://npm.io/package/react-native-modal-spinner

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2019-12-17
- 1.0.5 — 2019-12-06
- 1.0.4 — 2019-12-04
- 1.0.3 — 2019-12-04
- 1.0.2 — 2019-12-04
- 1.0.1 — 2019-12-03
- 1.0.0 — 2019-12-03

## README

# React-Native-Modal-Spinner

<div style="text-align: center">
  <img src="https://badgen.net/badge/node@LTS/>=8.11.1/green">
  <img src="https://badgen.net/badge/npm/>=5.6.0/blue">
  <img src="https://badgen.net/badge/react-native/>=0.57.4/orange">
  <img src="https://badgen.net/badge/code style/standard/yellow">
  <img src="https://badgen.net/badge/release/v1.0/pink">
</div>

A simple and fully customizable cross-platform React Native component that implements a spinner UI.

## Screenshots

<p float="left">
  <img src="src/images/image2.png" width="300" height="500"/>
</p>

## Getting Started

### Prerequisites

`NodeJS >= v8.11.1`
`react-native-cli >= 2.0.1`
`react-native >= 0.57.4`
`npm >= 5.6.0`

## Table of Contents

- [Install](#install)
- [Example](#example)
- [Options](#options)
- [License](#license)

## Install

[npm][]:

```sh
npm install react-native-modal-spinner
```

## Example

```js
import React, { Component } from "react";
import { View, Button } from "react-native";
import Spinner from "react-native-modal-spinner";

class SpinnerComponent extends Component {
  state = {
    visible: false
  };

  showSpinner = () => {
    this.setState({ visible: true }, () => {
      setTimeout(() => {
        this.setState({ visible: false });
      }, 3000);
    });
  };

  render() {
    return (
      <View
        style={{
          flex: 1,
          justifyContent: "center",
          alignItems: "center",
          backgroundColor: "#FFF"
        }}
      >
        <Button title="Show spinner" onPress={this.showSpinner} />
        <Spinner
          color="red"
          size="small"
          backgroundColor="#FFF"
          visible={this.state.visible}
          onClose={() => this.setState({ visible: false })}
        />
      </View>
    );
  }
}
```

## Options

| Property        | Type                       | Default                                         | Description                                                |
| --------------- | -------------------------- | ----------------------------------------------- | ---------------------------------------------------------- |
| visible         | Boolean                    | false                                           | Boolean to show/hide the spinner                           |
| size            | String (enum) small, large | "small"                                         | Size of the spinner                                        |
| backgroundColor | String                     | -                                               | Color of the spinner background                            |
| onClose         | Function                   | -                                               | Callback that is called when the user taps the back button |
| color           | String                     | default is gray on iOS and dark cyan on Android | Color of the spinner                                       |

## License

[MIT](LICENSE) © Ajay

##

[npm]: https://www.npmjs.com/

---
_Source: https://npm.io/package/react-native-modal-spinner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
