2.1.3 • Published 2 years ago

react-activity v2.1.3

Weekly downloads
2,922
License
MIT
Repository
github
Last release
2 years ago

React Activity Indicators

Build Status NPM Downloads

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 to your bundle.
  • 🆕 TypeScript support

preview

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.

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.

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 file.

2.1.2

2 years ago

2.1.3

2 years ago

2.1.1

3 years ago

2.0.2

3 years ago

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.3

6 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.16

7 years ago

1.0.15

8 years ago

1.0.14

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 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