Skip to content

fgnass/spin.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

653e79c · Jul 19, 2024
Jul 19, 2024
Feb 20, 2020
Feb 10, 2019
Jul 19, 2024
Nov 9, 2017
Jul 19, 2024
May 6, 2018
Sep 2, 2018
May 6, 2018
Jul 19, 2024
Jul 19, 2024
Feb 10, 2019
Oct 22, 2019
Jul 19, 2024
Jul 19, 2024

Repository files navigation

spin.js JS.ORG

An animated loading spinner

  • No images
  • No dependencies
  • Highly configurable
  • Resolution independent
  • Uses CSS keyframe animations
  • Works in all major browsers
  • Includes TypeScript definitions
  • Distributed as a native ES6 module
  • MIT License

Installation

npm install spin.js

Usage

CSS

<link rel="stylesheet" href="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.