Number Fields
Six field types store numbers, currencies, percentages, ratings, and progress indicators. All share the base field properties.
| Type | Stores |
|---|---|
integer |
Whole numbers with optional min/max range. |
decimal |
Fixed-precision decimals (1–10 decimal places). |
currency |
Monetary values with ISO 4217 code and formatting. |
percentage |
Percentage values, displayed with %. |
rating |
Star/icon rating with a configurable maximum. |
progress |
A 0–100 progress bar with an optional color. |
integer
Whole numbers without decimal places. Optimized for performance.
| Property | Description |
|---|---|
min |
Minimum allowed value (inclusive). |
max |
Maximum allowed value (inclusive). |
default |
Default integer for new records. |
- { id: 1, name: quantity, type: integer, required: true, min: 0, max: 1000, default: 1 }
decimal
Numbers with decimal places, stored with exact DECIMAL precision.
| Property | Description |
|---|---|
precision |
Number of decimal places. Integer from 1 to 10. |
min |
Minimum allowed value (inclusive). |
max |
Maximum allowed value (inclusive). |
default |
Default decimal for new records. |
- { id: 2, name: weight, type: decimal, precision: 2, min: 0.01, max: 999.99, default: 1.0 }
currency
Monetary values with locale-aware display formatting.
| Property | Description |
|---|---|
currency |
Required. ISO 4217 three-letter code (e.g. USD, EUR, GBP, JPY). |
precision |
Number of decimal places. Integer from 0 to 10 (default 2 for most currencies). |
min |
Minimum allowed value (inclusive). |
max |
Maximum allowed value (inclusive). |
symbolPosition |
Currency-symbol placement: before ($100) or after (100€). |
negativeFormat |
Negative-value display: minus (-100) or parentheses ((100)). |
thousandsSeparator |
Thousands grouping character: comma, period, space, or none. |
- id: 3
name: price
type: currency
required: true
currency: USD
precision: 2
symbolPosition: before
negativeFormat: parentheses
thousandsSeparator: comma
Corrected from earlier docs. currency uses thousandsSeparator — an enum (comma | period | space | none), not a boolean. negativeFormat accepts minus or parentheses (there is no red option), and precision ranges 0–10.
percentage
Percentage values (typically 0–100), displayed with a % symbol.
| Property | Description |
|---|---|
precision |
Number of decimal places. Integer from 0 to 10 (default 0). |
min |
Minimum allowed value (inclusive, typically 0). |
max |
Maximum allowed value (inclusive, typically 100). |
default |
Default percentage for new records. |
- { id: 4, name: discount_rate, type: percentage, precision: 1, min: 0, max: 100, default: 10.0 }
rating
A rating value rendered as stars or other indicators.
| Property | Description |
|---|---|
max |
Maximum rating value. Integer from 1 to 10 (default 5). |
style |
Visual style for the rating (e.g. stars). |
default |
Default rating value for new records. |
- { id: 5, name: product_rating, type: rating, max: 5, style: stars }
Corrected from earlier docs. The rating field uses max and style — not ratingMax / ratingStyle.
progress
Displays a 0–100 value as a progress bar. Used to track completion toward a goal.
| Property | Description |
|---|---|
color |
Progress-bar color as a 6-digit hex value (e.g. #10B981). |
default |
Default progress value (0–100) for new records. |
- { id: 6, name: task_completion, type: progress, color: '#10B981', default: 0 }
Corrected from earlier docs. The progress field uses color (a hex string) — not progressColor.