Skip to content

[Back to Parameters]

Number

A widget that allows users to enter integers or floats and supports basic numeric validation.

The range of acceptable values can be limited using minimum or minimumExclusive and maximum or maximumExclusive.

The number can also be limited to a certain step size by using multipleOf. For example, to allow digits up to two decimal places, set multipleOf to 0.01.

Specification

key type required default value description
multipleOf float no n/a Restricts the number to be a multiple of this value (eg. "multipleOf": 0.1 would allow any number up to one decimal place). Default is to allow as much precision as possible.
minimum float no minimum double value The minimum acceptable number x >= minimum.
minimumExclusive boolean no false The number has to be greater than this x > minimumExclusive.
maximum float no maximum double value The maximum acceptable number x <= maximum.
maximumExclusive boolean no false The number has to be lesser than this x < maximumExclusive.
showSlider boolean no false Shows a slider widget bounded by minimum and maximum along side the text entry field.
sliderTickIncrement float no 0 The interval between the ticks on the slider . If unspecified or set to 0, the tick increment will be automatically calculated.

Example

{
  "name": "somenumber",
  "type": "number",
  "valueType": "float",
  "prompt": "Minimum Separation",
  "multipleOf": 0.0001,
  "minimum": 0
}