# react-topbar-progress-indicator

> topbar progress indicator React component

Latest version **4.1.1** (published 2022-03-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-topbar-progress-indicator
pnpm add react-topbar-progress-indicator
yarn add react-topbar-progress-indicator
bun add react-topbar-progress-indicator
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.1.1 |
| Published | 2022-03-07 |
| First published | 2016-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 16.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 112 |
| Author | Maxime Thirouin |
| Maintainers | moox |
| Keywords | react, topbar, progress, progressbar, loading, loader, indicator |

## Links

- npm: https://www.npmjs.com/package/react-topbar-progress-indicator
- Repository: https://github.com/MoOx/react-topbar-progress-indicator
- Homepage: https://github.com/MoOx/react-topbar-progress-indicator#readme
- Issues: https://github.com/MoOx/react-topbar-progress-indicator/issues
- npm.io page: https://npm.io/package/react-topbar-progress-indicator

## Dependencies (1)

- [topbar](https://npm.io/package/topbar.md) ^0.1.3

## 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

- 4.1.1 (latest) — 2022-03-07
- 4.1.0 — 2020-01-31
- 4.0.2 — 2019-09-30
- 4.0.1 — 2019-08-16
- 4.0.0 — 2019-08-16
- 3.0.0 — 2019-08-16
- 2.0.0 — 2017-10-16
- 1.0.0 — 2016-04-05

## README

# react-topbar-progress-indicator

[![Build Status](https://github.com/MoOx/react-topbar-progress-indicator/workflows/Build/badge.svg)](https://github.com/MoOx/react-topbar-progress-indicator/actions)
[![Version](https://img.shields.io/npm/v/react-topbar-progress-indicator.svg)](https://github.com/MoOx/react-topbar-progress-indicator/blob/master/CHANGELOG.md)

> `topbar` progress indicator as a React component

Will simply `show()` and `hide()` [topbar](https://github.com/buunguyen/topbar)
when the component is respectively mounted and unmounted.

**Since topbar is a singleton, using `<TopBarProgress />` multiples times will
take this in consideration. This means that `hide()` will only be called when
all `<TopBarProgress />` have been unmounted.**

For example, if you render 2 `<TopBarProgress />` and unmount one (eg: you are doing 2
async things and only once is done), `hide()` won't be called.
You will need to have both instances unmounted.

## Installation

```console
npm install react-topbar-progress-indicator
## or
yarn add react-topbar-progress-indicator
```

## Usage

```js
import TopBarProgress from "react-topbar-progress-indicator";

TopBarProgress.config({
  barColors: {
    "0": "#fff",
    "1.0": "#fff"
  },
  shadowBlur: 5
});

const YourThing = () => {
  return <div>{this.state.loading && <TopBarProgress />}</div>;
};
```

### Config

Since `topbar` is a singleton, you should configure via `Topbar.config()`.

#### `barThickness` (Integer, px)

The progress bar thickness in `px` (default: 3).

#### `barColors` (Object { progress: color })

Object of gradient color stops used to draw the progress bar.

Example:

```js
  barColors: {
    "0": "#f00",
    "0.5": "#0f0",
    "1.0": "#00f",
  },
```

#### `shadowBlur`

Integer of the shadow blur in `px` (default: `10`).

#### `shadowColor`

String that represent the shadow color (hexa, default: `#000`).

---

## Changelog

Check the [changelog](./CHANGELOG.md) for more informations about recent
releases.
You might also find [releases notes on GitHub](https://github.com/MoOx/react-topbar-progress-indicator/releases).

## Contribute

_⇄ Pull requests and ★ Stars are always welcome._

Please read the [contribution guidelines](./CONTRIBUTING.md) before contributing.

## Code of Conduct

We want the community to be friendly and respectful to each other. Please read
[our full code of conduct](./CODE_OF_CONDUCT.md) so that you can understand what
actions will and will not be tolerated.

## License

[MIT](./LICENSE)

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