Skip to content

Slider ​

Sliding input device, showing current value and selectable range.

Basic usage ​

Basic usage of sliding input bar.

Disabled ​

Disable the slider.

Step ​

Set the step size by step, the default step size is 1. It is recommended to set a value that can be divisible by max-min, otherwise, the optional maximum value will be less than max. When show-ticks is set, the step ticks are displayed.

Step is 10

Step is 20

Step is 20 and show ticks

Marks ​

You can add text labels by setting marks.

Range slider ​

Range selection can be turned on by setting range, at this time modelValue is an array.

Show input ​

When show-input is set, the input will be displayed.

Vertical slider ​

Set direction is vertical and a vertical slider will be displayed.

Custom tooltip ​

You can customize the prompt text by setting format-tooltip.

Sizes ​

Besides default size, tu-slider component provides three additional sizes for you to choose among different scenarios. Use attribute size to set additional sizes with mini, small, large.

Slider API ​

Slider Attributes ​

NameDescriptionTypeDefault
v-modelBinding valueNumber Array-
default-valueDefault value (uncontrolled state))Number Array0
stepSliding stepNumber1
minMinimum sliding rangeNumber0
maxMaximum sliding rangeNumber-
marksSet the displayed labelObject-
directionThe direction of the sliderStringhorizontal
disabledWhether Slider is disabledBooleanfalse
show-ticksWhether Slider is to show ticksBooleanfalse
show-inputWhether Slider is to show inputBooleanfalse
rangeWhether Slider is to use range selectionBooleanfalse
show-tooltipWhether Slider is to show tooltipBooleantrue

Slider Events ​

NameDescriptionType
changeTrigger when the value changesFunction