# @propellerads/spinner

> ![size](https://img.shields.io/bundlephobia/min/@propellerads/spinner.svg) ![](https://img.shields.io/npm/v/@propellerads/spinner.svg?style=flat-square)

Latest version **5.0.0** (published 2026-10-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @propellerads/spinner
pnpm add @propellerads/spinner
yarn add @propellerads/spinner
bun add @propellerads/spinner
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2026-10-04 |
| First published | 2020-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 1 |
| Unpacked size | 12.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Vitaly Oleynik |
| Maintainers | ilyapasyuk, noc_propellerads, r.khizhenkov, d.borisevichus, s.lemnev, alex_zhurkin, d.zyuzin |

## Links

- npm: https://www.npmjs.com/package/@propellerads/spinner
- Repository: https://github.com/propellerads/ui-components
- Homepage: https://github.com/propellerads/ui-components#readme
- Issues: https://github.com/propellerads/ui-components/issues
- npm.io page: https://npm.io/package/@propellerads/spinner

## Dependencies (1)

- [clsx](https://npm.io/package/clsx.md) ^2.1.1

## Recent versions

- 5.0.0 (latest) — 2026-10-04
- 4.0.0 — 2026-04-15
- 3.0.2 — 2026-03-27
- 3.0.1 — 2026-02-09
- 3.0.0 — 2025-09-12
- 2.2.0 — 2023-03-01
- 2.1.1 — 2021-04-22
- 2.0.2 — 2020-09-09
- 2.0.1 — 2020-09-09
- 2.0.0 — 2020-09-09
- 1.0.0 — 2020-05-21

## README

# Spinner

![size](https://img.shields.io/bundlephobia/min/@propellerads/spinner.svg)
![](https://img.shields.io/npm/v/@propellerads/spinner.svg?style=flat-square)

[NPM](https://www.npmjs.com/package/@propellerads/spinner) |
[Github](https://github.com/propellerads/ui-components/tree/master/Components/Spinner)

A loading ring, the way shadcn's spinner is: `role="status"` with a label for a screen reader, colours from `@propellerads/tokens`, slower under `prefers-reduced-motion`.

## Installation

`bun add @propellerads/spinner`

The styles come with the package. Colours come from `@propellerads/tokens`: load its CSS once in the app.

## Usage

```tsx
import Spinner, {SpinnerColor, SpinnerSize} from '@propellerads/spinner';

<Spinner delay={300} center size={SpinnerSize.Md} color={SpinnerColor.Blue} />;
```

| Prop | Type | Default | |
|---|---|---|---|
| `delay` | `number` | `0` | Ms before it shows |
| `center` | `boolean` | `false` | Fills the container and stands in its middle |
| `size` | `'sm' \| 'md'` | `'md'` | 16px or 24px |
| `color` | `'black' \| 'white' \| 'blue' \| 'gray' \| 'gray_dark' \| 'red' \| 'current'` | `'black'` | See below |
| `label` | `string` | `'Loading'` | What a screen reader announces |
| `className` | `string` | | |

The ref reaches the outer `<span>`.

### Colours

| `color` | Token |
|---|---|
| `black` | `--color-dark-inversion` |
| `white` | `--color-light` |
| `blue` | `--color-action` |
| `gray` | `--color-quiet` |
| `gray_dark` | `--color-quiet-text` |
| `red` | `--color-danger` |
| `current` | the text colour around it |

Any other colour: set `--spinner-color` on the spinner or an ancestor.

### Old names

`SPINNER_SIZE` and `SPINNER_COLOR` from v2 and v3 are still exported, so moving from any version is a version bump.

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