stepper-input
1.1.0 • Public • Published Stepper
A simple numeric stepper for the frontend with no dependencies.
Installation
npm install stepper-input --save
Usage
import stepper from 'stepper-input';
stepper.bindAll();
Add this "component"
<form class='stepper'>
<button class='subtract' type='button'>-</button>
<input class='field' type='number' value='0' min='0' max='10' />
<button class='add' type='button'>+</button>
</form>
Then you should style these classes and elements: stepper
, add
, subtract
, field
.
Options
import stepper from 'stepper-input';
stepper.bindAll({
classes: {
stepper: 'my-stepper-class',
add: 'my-adder-class',
subtract: 'my-subtract-class',
field: 'my-field-class'
}
});
Package Sidebar
Install
Weekly Downloads