Number
Numbers can be used to input numerical values. Buttons increase and decrease the value by an amount specified with the step attribute. You can also set minimum and maximum values.
Example
{
type: "number",
value: 23,
label: "Number",
}Options
Input
Use these options when using the field with take.
value? | The initial value of the field. |
min? | The minimum value that will be accepted. |
max? | The maximum value that will be accepted. |
step? | The amount by which to increment the value. |
key? | A key to access the value. If provided, each field must have a unique key. See make for more information about accessing values. |
label? | A label describing the purpose of the field. Setting the label to false removes the element, which can be useful when nested as the only child within a group. |
detail? | Additional information about the field, disclosed in a tooltip. |
required? | Whether or not this field is required. |
Output
Use these options when using the field with make.
value? | The output value of the field. |
label? | A label describing the purpose of the field. Setting the label to false removes the element, which can be useful when nested as the only child within a group. |
detail? | Additional information about the field, disclosed in a tooltip. |
Data
If the input has a value, the field will pass a number between min and max, or undefined if one hasn’t been set yet.