A slider is a control that enables the user to adjust single values within a specified numerical range.
Use the slider to change values with graphical support.
The slider itself is not responsive. It adjusts to the responsiveness of its parent container by recalculating and resizing the width of the control.
The slider supports the cozy and compact form factors. The compact form factor is used for apps that run on a mouse and keyboard operated device.
Only a horizontal slider is available.
Behavior and Interaction
Changing the Value
- If the slider is editable, the hand cursor appears when the grip is hovered.
- The slider can be changed when the grip is adjusted via drag and drop.
- The grip can be moved with or without increments based on the predefined steps.
- The slider can be changed by clicking or tapping the bar. The grip then moves to this new position.
Slider with Text Fields
The slider can be used with text fields instead of tooltips. In this case, the value of the grip will be displayed.
Slider with Input Fields
The slider can be used with input fields instead of text fields – this allows the user to enter a specific value.
The slider can be shown with or without a progress bar. By default, the progress bar is shown.
Slider without progress bar
Slider with progress bar
- The step property must be positive. If a negative number is provided, the default value 1 is used instead.
- The minimum, maximum, and value properties can be decimals (float values). The slider automatically sets the minimum value to 0 and maximum value to 100 by default.
- The width of the control can be provided in %, em, px, and all possible CSS units. The slider automatically sets the width of the slider to 100% by default.
Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.