Skip to content

cyyyu/url-spinner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

url-spinner

npm version

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

Get started

Install

With npm: npm install url-spinner

Usage

Simple example

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

startSpinning({ duration: 3000 });

To customize the spinner

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

Apis

startSpining(options: UrlSpinnerOptions)

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

License

MIT (Chuang Yu cyu9960@gmail.com)

About

The spinner in your address bar

Resources

Stars

Watchers

Forks

Packages

No packages published