Search.../

stepType

Sets or gets a range slider's step type.

Description


Note: This property is only relevant when the sliderType is set to 'Stepped'.

The stepType defines the steps in a stepped range slider's track. It can be set to one of the following:

  • 'Number': The number of steps is determined by the step property's value. For example, suppose a range slider has a min value of 0, max value of 10, and step value of 5. There will be 5 steps, meaning each step will be 2 units.

    StepType Number

  • 'Value': The value of each step is equal to the number of units defined by the step property's value. For example, suppose a slider has a min value of 0, max value of 10, and step value of 5. Each step size will be 5 units, meaning there will be two 2 steps.

    StepType Value

Type:

stringRead & Write, default value is 'Number'

Was this helpful?

Get a range slider's step type

Copy Code
1let rangeSliderStepType = $w('#myRangeSlider').stepType; // 'Number'
Set a range slider's step type

Copy Code
1$w('#myRangeSlider').stepType = 'Number';