# char-spinner

> Put a little spinner on process.stderr, as unobtrusively as possible.

Latest version **2.0.0** (published 2026-01-07) · BlueOak-1.0.0 license · 0 weekly downloads

## Install

```sh
npm install char-spinner
pnpm add char-spinner
yarn add char-spinner
bun add char-spinner
```

## Health

**Score 60/100 (C)** — status: stable.

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-01-07 |
| First published | 2014-05-07 |
| Weekly downloads | 0 |
| License | BlueOak-1.0.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 42 |
| Author | Isaac Z. Schlueter |
| Maintainers | isaacs |
| Keywords | char, spinner |

## Links

- npm: https://www.npmjs.com/package/char-spinner
- Repository: https://github.com/isaacs/char-spinner
- Issues: https://github.com/isaacs/char-spinner/issues
- npm.io page: https://npm.io/package/char-spinner

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2026-01-07
- 1.0.1 — 2014-06-04
- 1.0.0 — 2014-05-07
- 0.0.0 — 2014-05-07

## README

# char-spinner

Put a little spinner on process.stderr, as unobtrusively as possible.

## USAGE

```ts
import { spinner } from 'char-spinner'

// All options are optional
// even the options argument itself is optional
const clear = spinner(options)

// the return value is the clear function
// call it to stop the spinner
clear()
```

## OPTIONS

Usually the defaults are what you want. Mostly they're just
configurable for testing purposes.

- `stream` Output stream. Default=`process.stderr`
- `tty` Only show spinner if output stream has a truish `.isTTY`. Default=`true`
- `string` String of chars to spin. Default=`'/-\\|'`
- `interval` Number of ms between frames, bigger = slower. Default=`50`
- `cleanup` Print `'\r \r'` to stream on process exit. Default=`true`
- `unref` Unreference the spinner interval so that the process can
  exit normally. Default=`true`
- `delay` Number of frames to "skip over" before printing the spinner.
  Useful if you want to avoid showing the spinner for very fast
  actions. Default=`2`
- `promise` Pass in a promise or promise-returning function if
  you want it to automatically stop spinning when the promise
  resolves.

Returns the generated interval, if one was created.

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