Reference Field Reference
fields.number()
Numeric input field.
Numeric input. Maps to editor { name: 'str-input', type: 'number' }. Localizable numbers are rare but allowed — e.g. region-specific prices.
Example
fields.number({
label: 'Price',
min: 0,
step: '0.01',
})Options
| Option | Type | Required | Description |
|---|---|---|---|
label | string | Yes | Label shown to editors in Strife Studio. |
description | string | No | Not shown in Studio's editor panel. |
localizable | boolean | No | When true, output is Record<string, number> instead of number. |
searchable | boolean | No | Stored on the template; nothing uses it today. |
filterable | boolean | No | Stored on the template; nothing uses it today. |
protected | boolean | No | Stops the field from being edited or removed in Studio's template designer. No effect in the editor panel. |
propertyName | string | No | Override the stored property name. |
placeholder | string | null | No | Hint text shown in the empty input. |
min | number | null | No | Minimum allowed value. |
max | number | null | No | Maximum allowed value. |
step | string | null | No | Increment step, passed straight through to the underlying HTML input — note this is typed as a string (e.g. '0.01'), not a number. |
Output type
number, or Record<string, number> when localizable: true.
See also
- Number — the same editor, documented from the Strife Studio UI side.