Why donate
API Explorer
Slider

The QSlider is a great way for the user to specify a number value between a minimum and maximum value, with optional steps between valid values. The slider also has a focus indicator (highlighted slider button), which allows for keyboard adjustments of the slider.

Also check its “sibling”, the QRange component.

Loading QSlider API...

Usage

WARNING

You are responsible for accommodating the space around QSlider so that the label and marker labels won’t overlap the other content on your page. You can use CSS margin or padding for this purpose.

Standard

Standard



Vertical

Vertical orientation



With inner min/max
v2.4+

Sometimes you need to restrict the model value to an interval inside of the track’s length. For this purpose, use inner-min and inner-max props. First prop needs to be higher or equal to min prop while the latter needs to be lower or equal to the max prop.

Inner min/max



With step

With step



The step property can also be floating point number (or numeric 0 if you need infinite precision).

Floating point



Snap to steps



With label

In the example below, move the slider to see the label.

With label



Always display label



Custom label value



The example below is better highlighting how QSlider handles label positioning so that it always stays inside the QSlider’s box horizontally.

Long label



Markers

Markers



Marker labels
v2.4+

Marker labels



TIP on slots

In order to use the marker label slots (see below), you must enable them by using the marker-labels prop.

Marker label slots



Other customizations
v2.4+

Color customizations



Hide selection bar



Custom track images



Track & thumb size



Lazy input

Lazy input



Null value

Null value



Reverse

In reverse



Force dark mode

Force dark mode



Readonly and disable

Readonly



Disable



With QItem

With QItem



Native form submit

When dealing with a native form which has an action and a method (eg. when using Quasar with ASP.NET controllers), you need to specify the name property on QSlider, otherwise formData will not contain it (if it should):

Native form