Unit
Enter numerical quantities of time, length, mass, area, force, energy, or pressure. The number can be entered in whichever unit is preferred from a given list of options. Before processing, the number is converted to a consistent unit specified by the tool, avoiding the need to handle conversion manually.
Example
{
type: "unit",
label: "Unit",
value: 12345000,
unit: "ms",
options: ["h m s"],
}Options
Input
Use these options when using the field with take.
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. |
value? | The initial value of the field. |
unit | The preferred unit to receive, regardless of the units that are currently selected by the user. |
options? | The units that are available to choose from. |
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. |
Output
Use these options when using the field with make.
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. |
value? | The initial value of the field. |
unit | The preferred unit to receive, regardless of the units that are currently selected by the user. |
Data
If the input has a value, the field will pass a number between min and max, or 0 if one hasn’t been set yet.