fgnass / spin.js

A spinning activity indicator
http://spin.js.org
MIT License
9.3k stars 1.02k forks source link

spin.js JS.ORG

An animated loading spinner

Installation

npm install spin.js

Usage

CSS

<link rel="stylesheet" href="https://github.com/fgnass/spin.js/blob/master/node_modules/spin.js/spin.css">

TypeScript or JavaScript

import {Spinner} from 'spin.js';

var target = document.getElementById('foo');
new Spinner({color:'#fff', lines: 12}).spin(target);

For an interactive demo and a list of all supported options please refer to the project's homepage.