Skip to content
/ spin Public

Higher level spinner api built on component/spinner - positions and scales automatically within target element

Notifications You must be signed in to change notification settings

component/spin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spin

Higher level spinner API auto positioning and scaling to fit within the target element. Built on component/spinner.

javascript spinner

Installation

$ component install component/spin

API

spin(el, [options])

Add a spinner to el with options, and return the Spinner instance.

  • size defaulting to 1/5th the element width
  • delay default to 300ms
var s = spin(document.querySelector('.one'));

Spinner#update()

Augments the Spinner returned with an .update() method, which updates the size and position of the spinner.

Spinner#remove()

Augments the Spinner returned with a .remove() method, which when removes the spinner or cancels delayed spinners.

License

MIT

About

Higher level spinner api built on component/spinner - positions and scales automatically within target element

Resources

Stars

Watchers

Forks

Packages

No packages published