Skip to content

Slider ​

Slider user input.

Slider example

Examples ​

js
import { Slider } from "pencil.js";

const position = [100, 200];
const options = {
    min: 0,
    max: 100,
    value: 42
};
const slider = new Slider(position, options);

SliderOptions ​

Inherit from InputOptions.

NameTypeDefaultComment
minNumber0Minimum value when the slider is at lowest
maxNumber10Maximum value when the slider is at highest
valueNumber0Initial value
widthNumber200Size of the slider

Released under the MIT License.