Number Field

Number Field

The number field stores numeric values.

Best For

  • counts
  • statistics
  • pricing values
  • ranking numbers
  • measurement-like values

Schema Example

{ "name": "statValue", "label": "Stat Value", "type": "number" }

Template Usage

<span class="stat-number">{{ statValue }}</span>

Formatting example:

<span class="price">{{ statValue | currency("$", 0) }}</span>

Use It When

Use number when the value should remain numeric for display, sorting, or predictable validation.

Do Not Use It When

Do not use number for:

  • formatted currency strings with extra symbols baked in
  • phone numbers
  • arbitrary mixed strings

Use text or a more specific field when the value is not truly numeric.

Technical Notes

  • keep raw values numeric and apply formatting in the template layer
  • avoid storing symbols, units, or separators directly in the saved value
  • prefer domain-specific labels around the number instead of baking presentation into the field itself