If you have technical questions, please create a support ticket in the DevExpress Support Center.
Create a Slider
To create a Slider, declare it in markup and use the min and max properties to limit the range of accepted values.
You can also specify the value property to change the initial value.
The Default mode section shows a Slider with such a basic setup.
Customize Slider Appearance
Max and min labels
The Slider can display labels for the min and max values. To configure the labels, use the label object. In this object, specify the visible, position, and format properties.
Tooltip
To display a handle tooltip, you need to configure the tooltip object:
-
Set the enabled property to
true
to display a tooltip. -
Specify the tooltip position: over or under the Slider.
-
Specify the format property.
-
Assign 'onHover' or 'always' to the showMode property to change how the component shows a tooltip.
Range highlight
Use the showRange property to specify if the component should highlight the range between min and value.
Discrete step
Use the step property to specify the value change step for the Slider.
Disabled state
If you want to disable the Slider, set the disabled property to true
.
Handle the Value Change Event
Specify the onValueChanged function to handle the value change. In this demo, the NumberBox component and the Sliders use this function to exchange values.
The valueChangeMode property allows you to choose when the Slider changes its value. Available modes include onHandleMove
and onHandleRelease
. You can see the property's effect in the Process Value Changes section. The first Slider changes its value while a user slides the handle. The second Slider changes its value only after the user releases the handle. These Slider values are synchronized.