gpui-kit GitHub

Components

Slider builder

A horizontal track with one handle.

A builder is RenderOnce. Construct and mount it in one expression.

use gpui_kit::controls::Slider;

Construct

new(ident: impl Into<Ident>) -> Self

Options

Chain onto the value.

label(label: impl Into<SharedString>) -> Self
range(min: f32, max: f32) -> Self
value(value: f32) -> Self
step(step: f32) -> Self
display(display: impl Into<SharedString>) -> Self
on_change(handler: impl Fn(f32, &mut Window, &mut App) + 'static) -> Self

Rendered by

Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.

Source: crates/gpui-kit/src/controls/slider.rs