When to use it
Preserve the raw localized String draft, including unfinished sign or decimal input. Grouping and exponent notation are unsupported. Keep currency, units, required validation, and submission parsing application-owned.
Edit localized numeric drafts with exact decimal steps and inclusive bounds.
Native example
Preserve the raw localized String draft, including unfinished sign or decimal input. Grouping and exponent notation are unsupported. Keep currency, units, required validation, and submission parsing application-owned.
LumenNumberField(
label = "Quantity",
value = quantityDraft,
onValueChange = { quantityDraft = it },
min = java.math.BigDecimal.ZERO,
max = java.math.BigDecimal.TEN,
step = java.math.BigDecimal("0.5")
)Reference
The primary shared and platform-specific options exposed by LumenNumberField.
| API | Values or type | Default | Description |
|---|---|---|---|
| label | String | Required | Names the numeric field. |
| value / onValueChange | String / (String) -> Unit | Required | Controls raw localized ungrouped input; drafts beyond 128 characters are invalid. |
| modifier | Modifier | Modifier | Applies layout to the field and step actions. |
| min / max | java.math.BigDecimal? | null | Inclusive exact decimal bounds; minimum must not exceed maximum. |
| step | java.math.BigDecimal | BigDecimal.ONE | Positive exact increment; precision and scale are bounded to 128. |
| locale | java.util.Locale | Locale.getDefault() | Selects accepted decimal separator and displayed digits. |
| description / errorMessage | String? | null | Shows supporting text; supplied errors take priority over draft validation. |
| invalidNumberLabel / outOfRangeLabel | String | Enter a valid number / Enter a number within the allowed range | Localizes draft and bound errors. |
| incrementLabel / decrementLabel | String | Increase value / Decrease value | Names step actions. |
| showStepper | Boolean | true | Shows optional increment and decrement actions. |
| enabled / readOnly | Boolean | true / false | Controls edits and steps without discarding the current value. |
Native behavior
Preserve the raw localized String draft, including unfinished sign or decimal input. Grouping and exponent notation are unsupported. Keep currency, units, required validation, and submission parsing application-owned.
Labels the editable numeric draft and step actions, exposes invalid or out-of-range context, and disables unavailable or read-only steps.
Shared component