# url-spinner

> The spinner in your address bar

Latest version **1.0.1** (published 2019-04-14) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-04-14 |
| First published | 2019-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 485.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 72 |
| Author | Chuang Yu |
| Maintainers | cyyyu |
| Keywords | loading, spinner |

## Links

- npm: https://www.npmjs.com/package/url-spinner
- Repository: https://github.com/cyyyu/url-spinner
- Homepage: https://github.com/cyyyu/url-spinner#readme
- Issues: https://github.com/cyyyu/url-spinner/issues
- npm.io page: https://npm.io/package/url-spinner

## Recent versions

- 1.0.1 (latest) — 2019-04-14
- 1.0.0 — 2019-04-13

## README

# url-spinner

[![npm version](https://badge.fury.io/js/url-spinner.svg)](https://badge.fury.io/js/url-spinner)

The spinner in your address bar. Inspired by http://wavyurl.com

<img src="./assets/example1.gif" width="500" />
<img src="./assets/example2.gif" width="500" />
<img src="./assets/example3.gif" width="500" />
<img src="./assets/example4.gif" width="500" />

## Get started

### Install

With npm: `npm install url-spinner`

### Usage

Simple example

```javascript
import { startSpinning } from "url-spinner";

const stopSpinning = startSpinning();

// Perform some async tasks and call stopSpinning at a proper time
setTimeout(stopSpinning, 3000);
```

To stop spinning automatically by 3s later

```javascript
startSpinning({ duration: 3000 });
```

To customize the spinner

```javascript
startSpinning({
  duration: 3000,
  spinner: ["🌚", "🌘", "🌗", "🌖", "🌝", "🌔", "🌓", "🌒"]
});
```

<img src="./assets/example2.gif" />

## Apis

`startSpining(options: UrlSpinnerOptions)`

```typescript
export interface UrlSpinnerOptions {
  spinner?: string[];
  duration?: number;
}
```

## License

MIT ([Chuang Yu <cyu9960@gmail.com>](https://github.com/cyyyu))

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