Skip to main content

stepper

Function stepper 

Source
pub fn stepper(
    id: impl Into<String>,
    value: impl Into<SharedString>,
    on_step: impl Fn(f32, &mut Window, &mut App) + 'static,
) -> impl IntoElement
Expand description

− value +: a number changed in steps, by its buttons or by dragging the number (see scrub_label). The caller holds the value and formats it. Element ids: {id}-minus, {id}-value, {id}-plus. The buttons are gpui-kit’s small size, theme::XS apart (designparser touch-target: about 24 px each).