+0
日增长
9,236
stars
996
forks
169
watchers
88
prs
306
issues
1
releases
README
spin.js
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
html
TypeScript or JavaScript
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.Top issues
#392Invoking spinner before a "promise" not working5 comments · 2024-06-08#331Safari back button shows spinner indefinitely4 comments · 2016-11-23#275Right positioning is required3 comments · 2015-01-22#386Uncaught SyntaxError: Unexpected token 'export' (at spin.js:82:1)2 comments · 2022-09-29#387add mask1 comments · 2023-08-30#256Dynamically change color of the spinner1 comments · 2014-10-20#395The spinner instance is not available for stop method0 comments · 2025-06-13#393Clarification needed: how can I run spin.js options file detailed on website?0 comments · 2024-06-09
Latest release
4.1.2 4.1.2 2024-07-19Changed - Removed some dead code left over from version 3.x.