Slider Question Schema Properties
A slider question for selecting a numeric value within a range.
Element type: slider
Key properties: 17
Generation Hints
Section titled “Generation Hints”- Aliases: range input, numeric scale, slider control.
- Use when: respondents choose a number from a continuous range.
- Recommended properties:
type,name,title,min,max,step,defaultValue.
{ "type": "slider", "name": "budget", "title": "Budget", "min": 0, "max": 10000, "step": 500 }Key Properties
Section titled “Key Properties”- Type:
number - Default:
0
Defines the minimum value on the slider scale.
- Type:
number - Default:
100
Defines the maximum value on the slider scale.
- Type:
number - Default:
1
Sets the interval between selectable scale values.
sliderType
Section titled “sliderType”- Type:
string - Default:
"single" - Allowed values:
single,range
Specifies whether the slider allows selecting a single value (“single”) or a value range (“range”).
allowSwap
Section titled “allowSwap”- Type:
boolean - Default:
true
Allows the start and end thumbs to cross over each other. If false, the thumbs cannot be swapped. Applies only if sliderType is “range”.
allowClear
Section titled “allowClear”- Type:
boolean - Default:
false
Specifies whether to display a button that clears the selected slider value and resets it to undefined.
minRangeLength
Section titled “minRangeLength”- Type:
number - Default:
—
Specifies the minimum length between the two thumbs of a range slider. Applies only if sliderType is “range”.
maxRangeLength
Section titled “maxRangeLength”- Type:
number - Default:
—
Specifies the maximum length between the two thumbs of a range slider. Applies only if sliderType is “range”.
labelCount
Section titled “labelCount”- Type:
number - Default:
-1
Defines how many auto-generated labels should be displayed along the slider scale. Ignored if the customLabels property is set.
showLabels
Section titled “showLabels”- Type:
boolean - Default:
true
Specifies whether the slider displays value labels along the scale.
labelFormat
Section titled “labelFormat”- Type:
string - Default:
"{0}"
A formatting string for auto-generated or custom labels. You can use {0} as a placeholder for the label’s numeric value.
customLabels
Section titled “customLabels”- Type:
sliderlabel[] - Default:
[]
Specifies custom scale labels. Overrides auto-generated labels if defined.
tooltipVisibility
Section titled “tooltipVisibility”- Type:
string - Default:
"auto" - Allowed values:
auto,always,never
Controls the visibility of thumb tooltips.
tooltipFormat
Section titled “tooltipFormat”- Type:
string - Default:
"{0}"
A formatting string for thumb tooltips. You can use {0} as a placeholder for a tooltip’s numeric value.
autoGenerate
Section titled “autoGenerate”- Type:
string - Default:
true - Allowed values:
true,false
minValueExpression
Section titled “minValueExpression”- Type:
expression - Default:
—
An expression that dynamically calculates the minimum scale value. Overrides the static min property if defined.
maxValueExpression
Section titled “maxValueExpression”- Type:
expression - Default:
—
An expression that dynamically calculates the maximum scale value. Overrides the static max property if defined.
Shared Properties
Section titled “Shared Properties”This page lists only properties that are specific to this element type or especially important for generation.
- Use Shared Question Properties for common fields such as
name,title,description,isRequired,requiredIf,visibleIf,enableIf,readOnly,defaultValue,validators,width, and layout options.