Options

noUiSlider can be configured with a wide variety of options, which can be use to customize a slider's behaviour.

For options regarding the slider range, see slider values.

Start

The start option sets the number of handles and corresponding start positions.

The start option uses the slider's 'format' option to decode the input. Number input will be cast to string and decoded.

Default
none
Accepted values
'string',
array['string'],
array['string', 'string', ...]

Connect

The connect option can be used to control the bar between the handles or the edges of the slider.

Pass an array with a boolean for every connecting element, including the edges of the slider. The length of this array must match the handle count + 1.

Setting true sets the bars between the handles, but not between the handles and the sliders edges.

Default
false
Accepted values
true,
false,
array[...]

Margin

When using two handles, the minimum distance between the handles can be set using the margin option. The margin value is relative to the value set in 'range'. This option is only available on linear sliders.

Default
none
Accepted values
number
Show the slider value

Limit

The limit option is the oposite of the margin option, limiting the maximum distance between two handles. As with the margin option, the limit option can only be used on linear sliders.

Default
none
Accepted values
number
Show the slider value

Padding

Padding limits how close to the slider edges handles can be.

Default
0
Accepted values
number,
array[number],
array[number, number]
Show the slider value

Step

By default, the slider slides fluently. In order to make the handles jump between intervals, you can use the step option.

Default
none
Accepted values
number

Orientation

The orientation setting can be used to set the slider to "vertical" or "horizontal".

Set dimensions! Vertical sliders don't assume a default height, so you'll need to set one. You can use any unit you want, including % or px.

Default
"horizontal"
Accepted values
"vertical", "horizontal"

Direction

By default the sliders are top-to-bottom and left-to-right, but you can change this using the direction option, which decides where the upper side of the slider is.

Default
"ltr"
Accepted values
"ltr", "rtl"
Show the slider value

Tooltips

noUiSlider can provide a basic tooltip using the tooltips option. This option can also accept formatting options to format the tooltips content. In that case, pass an array with a formatter for each handle, true to use the default or false to display no tooltip.

Default
false
Accepted values
false, true, formatter, array[formatter or true or false, ...]

Animate

Set the animate option to false to prevent the slider from animating to a new value with when calling .set().

Default
true
Accepted values
true, false

The animationDuration option can be used to set the animation speed assumed by the slider library. In addition to this, you must manually alter the CSS (-webkit-)transition property for the .noUi-state-tap .noUi-origin selector.

Default
300
Accepted values
number