ispinjs

vanilla javascript number spinner

On Github

Demo

var el = document.getElementById('number-input');
var spinner = new ISpin(el, {
  // options with defaults
  wrapperClass: 'ispin-wrapper',
  buttonsClass: 'ispin-button',
  step: 1,
  pageStep: 10,
  disabled: false,
  repeatInterval: 200,
  wrapOverflow: false,
  parse: Number,
  format: String
});

Features

  • easy to use
  • no external dependencies
  • supports all major browsers and IE11+
  • customizable and extendable

Install

Install from npm or use CDN:

<link href="https://unpkg.com/ispin/dist/ispin.css" rel="stylesheet">
<script src="https://unpkg.com/ispin"></script>