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>) -> SelfOptions
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) -> SelfRendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.