Package Exports
- slidy
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (slidy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
slidy
Range slider component. Tests.
Usage
$ npm install slidy
var Slidy = require('slidy');
var slidy = new Slidy({
min: 0,
max: 100,
value: 12
});
document.body.appendChild(slidy.element);
Slider API
Name | Description |
---|---|
Slidy#min |
Minimum value. |
Slidy#max |
Maximum value. |
Slidy#value |
Picker value. In case of multiple pickers - first picker's value. |
Slidy#pickers |
List of picker instances. Can be passed in options as a list of options for each picker. Slidy({pickers: [{value:0}, {value: 1}, ...] }) |
Slidy#createPicker(options?) |
Create a new picker. |
Slidy#getClosestPicker(x, y) |
Get picker closest to the relative x , y coordinates within the slidy container. |
Slidy#update() |
Update all pickers sizes and positions. |
Picker API
Name | Description |
---|---|
Picker#min |
Minimum value. |
Picker#max |
Maximum value. |
Picker#value |
Current raw value of a picker. |
Picker#type |
Type of placement - 'horizontal' , 'vertical' , 'rectangular' , 'circular' . |
Picker#move(x, y) |
Move picker to relative x , y coordinates. |
Picker#startDrag() |
Start dragging for the picker. |
Picker#renderValue(value) |
Move picker so to visually reflect the value passed. |
Picker#calcValue() |
Calculate value from picker’s position. |