Skip to content

Component NumberInput

MeowLynxSea edited this page Jan 23, 2026 · 5 revisions

NumberInput

A numeric input with stepper buttons.

The text field is controlled by the numeric value (non-numeric characters are not retained).

Example

use gpui::ElementId;
use yororen_ui::component::number_input;

let view = number_input()
    .key(ElementId::from(("settings", "retries")))
    .min(0.0)
    .max(10.0)
    .step(1.0)
    .value(3.0)
    .on_change(|value, _window, _cx| {
        // value: f64
    });

Clone this wiki locally