百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-activity

> 编程语言
开源

以 React 组件形式的活动指标库。

191 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

以 React 组件形式的活动指标库。

React Activity Indicators

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

Demo & Examples

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

To run the examples locally, run:

bash
yarn && yarn start

Then open http://localhost:8000 in your browser.

Install

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

bash
npm install react-activity react react-dom

Getting Started

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

javascript
import React from "react";
import { render } from "react-dom";

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

const App = () => {
  return ;
};

render(, document.getElementById("app-container"));

Optimizing Your Build

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

javascript
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 ;
};

render(, 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.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言