(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
range
 
range
 
===Type===
 
===Type===
_input
+
input
 
===Synopsis===
 
===Synopsis===
 
How to render an input slider
 
How to render an input slider
Line 22: Line 22:
 
===Example===
 
===Example===
 
<syntaxhighlight lang="html">
 
<syntaxhighlight lang="html">
   <_input type="range" min="5" max="10" step="0.01" />
+
   <input type="range" min="5" max="10" step="0.01" />
 
</syntaxhighlight>
 
</syntaxhighlight>
  <_input type="range" min="5" max="10" step="0.01" />
+
  <input type="range" min="5" max="10" step="0.01" />
 
===Note===
 
===Note===
 
By default, the granularity, is 1, meaning that the value is always an integer. You can change the step attribute to control the granularity. For example, If you need a value between 5 and 10, accurate to two decimal places, you should set the value of step to 0.01.
 
By default, the granularity, is 1, meaning that the value is always an integer. You can change the step attribute to control the granularity. For example, If you need a value between 5 and 10, accurate to two decimal places, you should set the value of step to 0.01.
ws-class-props
Line 1: Line 1:
 
{{Doc properties
 
{{Doc properties
|Subject version=2.0
+
|Subject version=2.0,2.1
 
|Doc subject=DevOps:Doc/FlexForm
 
|Doc subject=DevOps:Doc/FlexForm
 
|Doc parent=DevOps:Doc/FlexForm/1.0/input
 
|Doc parent=DevOps:Doc/FlexForm/1.0/input

Latest revision as of 21:09, 31 March 2023

Name

range

Type

input

Synopsis

How to render an input slider

Description

Used to get a value between x and y, presented to the user as a slider.

Parameters

type="range"

Other options : autocomplete list min max step value

All other valid parameters for an input field are valid

Example

  <input type="range" min="5" max="10" step="0.01" />

Note

By default, the granularity, is 1, meaning that the value is always an integer. You can change the step attribute to control the granularity. For example, If you need a value between 5 and 10, accurate to two decimal places, you should set the value of step to 0.01.

If you want to accept any value regardless of how many decimal places it extends to, you can specify a value of "any" for the step attribute.

Links