# react-activity

> Activity indicator component library for React applications.

Latest version **2.1.3** (published 2022-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-activity
pnpm add react-activity
yarn add react-activity
bun add react-activity
```

## 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 | 2.1.3 |
| Published | 2022-02-04 |
| First published | 2015-12-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 115.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 190 |
| Author | Luke Vella |
| Maintainers | lukevella |
| Keywords | react, activity, indicator, ajax, loader |

## Links

- npm: https://www.npmjs.com/package/react-activity
- Repository: https://github.com/lukevella/react-activity
- Homepage: https://github.com/lukevella/react-activity#readme
- Issues: https://github.com/lukevella/react-activity/issues
- npm.io page: https://npm.io/package/react-activity

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.1.3 (latest) — 2022-02-04
- 2.1.2 — 2022-02-04
- 2.1.1 — 2021-07-09
- 2.1.0 — 2021-07-09
- 2.0.2 — 2021-07-08
- 2.0.1 — 2021-05-11
- 2.0.0 — 2021-05-10
- 1.2.2 — 2018-03-24
- 1.2.1 — 2018-03-03
- 1.2.0 — 2018-03-01
- 1.1.3 — 2017-11-27
- 1.1.2 — 2017-04-22
- 1.1.1 — 2017-04-20
- 1.1.0 — 2017-04-20
- 1.0.16 — 2017-01-22
- … 15 more at https://npm.io/package/react-activity/versions

## README

# React Activity Indicators

[![Build Status](https://travis-ci.org/lukevella/react-activity.svg)](https://travis-ci.org/lukevella/react-activity)
[![NPM Downloads](https://img.shields.io/npm/dm/react-activity.svg)](https://www.npmjs.com/package/react-activity)

A library of activity indicators in the form of React components.

- 🔥 8 different animations to choose from
- 🎨 Customizable color, size and animation speed
- 🕺 Small footprint. Only ~7kB if you [add a single component](#optimizing-your-build) to your bundle.
- 🆕 TypeScript support

![preview](https://user-images.githubusercontent.com/676849/37826344-579320d0-2e93-11e8-8f01-faa09385bf64.gif)

## Demo

Live demo: https://react-activity.lukevella.com

## Install

React, ReactDOM are peer dependencies, if you haven't already installed them use:

```
npm install react-activity react react-dom
```

## Getting Started

Import the activity indicators you would like to use along with its corresponding css file.

```jsx
import React from "react";
import { render } from "react-dom";

import { Dots } from "react-activity";
import "react-activity/dist/library.css";

const App = () => {
  return <Dots />;
};

render(<App />, document.getElementById("app-container"));
```

## Optimizing Your Build

To avoid bundling unnecessary code and css to your project, you can import the
activity indicators individually.

```js
import React, { Component } from "react";
import { render } from "react-dom";

import Dots from "react-activity/dist/Dots";
import "react-activity/dist/Dots.css";

const App = () => {
  return <Dots />;
};

render(<App />, document.getElementById("app-container"));
```

## Activity Indicators

- `Dots`
- `Levels`
- `Sentry`
- `Spinner`
- `Squares`
- `Digital`
- `Bounce`
- `Windmill`

## Props

All indicators support the following props:

- `size: number` All dimensions of the activity indicators are
  specified in ems so play around with a value until you find something that
  suits your needs.
- `color: string` The active color of the indicator.
- `speed: number (default: 1)` The relative animation speed of the indicator.
- `animating: boolean (default: true)` Whether to show the indicator (true) or hide it (false).
- `style: React.CSSProperties (default: undefined)` Custom styling to be applied to the container.
- `className: string (default: undefined)` Custom className to be applied to the container.

## License

See [LICENSE](https://github.com/lukevella/react-activity/blob/gh-pages/LICENSE) file.

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