Search.../

stepType

Sets or gets a slider's step type.

Description

The stepType determines how the slider's steps work:

The step type can be:

  • "value": Each step's size is 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's size will be 5 units, meaning there will be 2 steps.
  • "count": The number of steps is determined by number the units in 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. There will be 5 steps, meaning each step will be 2 units.

Type:

stringRead & Write, default value is "value"

Was this helpful?

Get a slider's step type

Copy Code
1let sliderStepType = $w("#mySlider").stepType; // "count"
Set a slider's step type

Copy Code
1$w("#mySlider").stepType = "count";