Portal Community

Minimal Example

{
  "id": "quantity",
  "type": "number",
  "label": "Quantity",
  "required": true,
  "width": "third",
  "binding": {
    "source": "$json",
    "path": "order.quantity"
  }
}

Settings Reference

SettingTypeDefaultDescription
minnumberMinimum allowed value (inclusive)
maxnumberMaximum allowed value (inclusive)
stepnumber1Increment amount for spinner up/down buttons
precisionnumberNumber of decimal places to display and accept
formatnone | currency | percentnoneDisplay formatting applied in view mode and on blur
currencystring (ISO 4217)USDCurrency code used when format: "currency"
localestring (BCP 47)browser localeLocale for number formatting (comma/period separators)
showSpinnerbooleantrueShow increment/decrement arrows on the input
placeholderstringPlaceholder text shown when empty
prefixstringStatic label before input (e.g., $)
suffixstringStatic label after input (e.g., kg, %)

Range and Step Validation

{
  "id": "age",
  "type": "number",
  "label": "Age",
  "settings": {
    "min": 18,
    "max": 120,
    "step": 1,
    "placeholder": "Enter your age"
  },
  "validation": {
    "required": true,
    "min": 18,
    "max": 120
  }
}
Settings vs Validation min/max in settings constrains the spinner buttons and HTML input attributes. The same values in validation trigger the validation engine with an error message. Set both to ensure complete enforcement.

Currency Formatting

When format: "currency" is set, the value is formatted on blur and in view mode using the browser's Intl.NumberFormat API. The stored value remains a plain number (not a formatted string):

{
  "id": "invoice-amount",
  "type": "number",
  "label": "Invoice Amount",
  "width": "half",
  "settings": {
    "format": "currency",
    "currency": "USD",
    "locale": "en-US",
    "precision": 2,
    "min": 0,
    "prefix": "$"
  },
  "binding": {
    "source": "$json",
    "path": "invoice.amount"
  }
}

// User types: 1500
// Displayed on blur: $1,500.00
// Stored value: 1500

Percentage Format

{
  "id": "tax-rate",
  "type": "number",
  "label": "Tax Rate",
  "width": "third",
  "settings": {
    "format": "percent",
    "precision": 2,
    "min": 0,
    "max": 100,
    "suffix": "%"
  }
}

// User types: 8.5
// Displayed: 8.50%
// Stored: 8.5

Decimal Precision

Use Caseprecisionstep
Whole numbers (count, quantity)01
Currency (USD, EUR)20.01
Scientific / high accuracy60.000001
Percentage20.01
Weight (kg with grams)30.001

Quick-Pick Integration

The number input is commonly used in the Quick-Pick pattern alongside a select dropdown. See the Quick-Pick Pattern guide for a complete example. The core idea: a select with preset values and a number manual override share the same binding.path. Last-write-wins.

Full Example — Product Line Item

{
  "id": "unit-price",
  "type": "number",
  "label": "Unit Price",
  "width": "third",
  "order": 2,
  "settings": {
    "format": "currency",
    "currency": "USD",
    "precision": 2,
    "min": 0,
    "showSpinner": false
  },
  "validation": {
    "required": true,
    "min": 0
  },
  "binding": {
    "source": "$json",
    "path": "lineItem.unitPrice"
  }
},
{
  "id": "quantity",
  "type": "number",
  "label": "Qty",
  "width": "third",
  "order": 3,
  "settings": {
    "min": 1,
    "max": 9999,
    "step": 1,
    "precision": 0
  },
  "validation": {
    "required": true,
    "min": 1
  },
  "binding": {
    "source": "$json",
    "path": "lineItem.quantity"
  }
}