Slider

2

Range

To show a range value the v-model should be an array of two numbers

4
8

Step

Jumps by step instead of default value of 1.

40

tooltip & alwaysTooltip

tooltip shows a tooltip when dragging the slider and alwaysTooltip keeps it visible.

4

ticks & tickLabels

Both props are boolean. ticks shows a small dot on each value and tickLables defines whether to show the label of the ticks which defaults to the value of that tick.

1
2
3
4
5
6
7
8
9

Custom Ticks

You can define your own ticks and their labels. it will be an array of objects including keys of value (value of tick) and text.

Cold
Semi Cold
Warm
Hot
40

Tick Slot

Tick label is customizable using named tick slot. if receives {value: number} as slot props or whatever you pass in each item of customTicks.

By default first and last ticks are hidden to avoid style issues they might cause, to reset this behaviour set hideFirstAndLastTickLabel to false.

🧊 Cold
Semi Cold
Warm
🔥 Hot
38 °C

Props

NameTypeRequiredDefault ValueDescription
modelValuenumber | Array<number>Yes0The value of slider ( array when it's a range [left: number, right: number] ).
minnumberNo-The minimum value of the slider.
maxnumberNo-The maximum value of the slider.
stepnumberNo1The steps in which the slider should move.
precisionnumberNo0Numer of decimals.
tooltipbooleanNofalseWhether to show tooltip on grab
alwaysTooltipbooleanNofalseIf true will always show tooltip
colorstringNoundefinedColor of slider
ticksbooleanNofalseIf true will show ticks in which value can stop on
tickLabelsbooleanNofalseIf true will show label of ticks
customTicksArray<{text: string, value: number}>NoundefinedFor showing custom tick labels
hideFirstAndLastTickLabelbooleanNotrueWhether to hide first and last tick label or not.

Slots

Nameslot propsdescription
tooltip{ value }-
tick{ value, text }custom tick component