range-slider

A simple range slider UI element for use with browserify

OTHER License

Downloads
296
Stars
9
Committers
2

range-slider experimental

A simple range slider UI element for use with browserify.

view example

Usage

This module expects a "wrapper" element, and creates the slidable part on the inside, which will take up the full size of its parent. Note that if the parent doesn't have position: relative|fixed|absolute set, this will be set to relative on your behalf.

inner = range(slide, [inital], update)

Returns the slider's inside DOM element, where slide is a parent element that you've already created.

initial is an optional value between 0 and 1 for determining where to start the slider. update(value) is a function that's called every time the slider's value changes – the value will always be a number between 0 and 1, where 0 is the left side of the slider and 1 is the right.

License

MIT. See LICENSE.md for details.