Higher level spinner API


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

$ component install component/spin

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'));

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