Range Slider
Introduction
The range slider is a basic Magic Pen component that allows users to select a range between two values by dragging the slider.
Configurations
Category |
Configuration |
Example |
Description |
Content |
Start value |
The start value. |
|
End value |
The end value. |
||
Minimum value |
The minimum value of the range. |
||
Maximum value |
The maximum value of the range. |
||
Label |
The label. For more information, see Common Form Properties. |
||
Tooltip |
The tooltip settings that appear when the mouse hovers over the slider. |
||
Interaction |
Hide |
Hides the component. For more information, see Common Properties. |
|
Keep layout when hidden |
Keeps the layout space when the component is hidden. For more information, see Common Properties. |
||
Step size |
The step value for the slider. |
||
Draggable range |
The entire selected range can be dragged. |
||
Disable |
Disables the component. When disabled, the component is not interactive. |
||
Style |
Margin |
The margin. For more information, see Common Properties. |
|
Tick marks |
|
The tick marks. The key must be a |
|
Reverse axis |
Reverses the slider, swapping the left and right ends. |
||
CSS Style |
Label font size |
Sets the font size of the label. |
|
Left margin |
Sets the left margin. |
||
Right margin |
Sets the right margin. |
Properties and methods
Name |
Type |
Example |
Description |
start |
number |
|
The start value of the range slider component. |
end |
number |
|
The end value of the range slider component. |
labelText |
string |
|
Read-only. The text content of the slider component's label. |
disabled |
boolean |
|
Indicates whether the slider component is disabled. |
max |
number |
|
Read-only. The maximum value of the slider component's range. |
min |
number |
|
Read-only. The minimum value of the slider component's range. |
marks |
object |
|
Read-only. The tick marks of the slider component. |
reverse |
boolean |
|
Read-only. Indicates whether the slider component's axis is reversed. |
step |
number |
|
Read-only. The step size of the slider component. |
draggableTrack |
boolean |
|
Read-only. Indicates whether the range of the range slider component is draggable. |
validationMessage |
string |
|
The validation result message. |
validationStatus |
boolean |
|
Indicates whether the component passed validation. |
setStart |
func |
|
Sets the start value of the range slider component. |
setEnd |
func |
|
Sets the end value of the range slider component. |
setDisabled |
func |
|
Sets whether the slider component is disabled. |
focus |
func |
|
Sets focus on the component. |
blur |
func |
|
Removes focus from the component. |
clearValidate |
func |
|
Clears the validation status. |
validate |
func |
|
Validates the component. |
Event callbacks
Configuration |
Description |
The callback triggered when the value changes. |
|
The callback triggered when the slider receives focus. |
|
The callback triggered when the slider loses focus. |
