Number field
A numeric input.
Text that parses updates value as you type; on Enter or blur, text that does not parse is replaced by the stored value, so the field never shows a number it did not store.
GUITUIRuns in the browser
number_fieldPreview
























Usage example
fn number_field_demo() -> NumberFieldBuilder<i32> { number_field(signal(4_i32), 1..=99) }fn number_field_demo()-> NumberFieldBuilder<i32> { number_field(signal(4_i32), 1..=99) }States

Default
Hover
Pressed
Focused
Disabled
Invalid
API
| Name | Signature | Purpose |
|---|---|---|
number_field | fn number_field<T: NumericKind>(value: Signal<T>, range: RangeInclusive<T>) -> NumberFieldBuilder<T> | A numeric input. Text that parses updates value as you type; on Enter or blur, text that does not parse is replaced by the stored value, so the field never shows a number it did not store. |