Skip to content

Component Slider

MeowLynxSea edited this page Jan 23, 2026 · 5 revisions

Slider

A continuous (or stepped) value control.

Notes:

  • Clicking anywhere on the control adjusts the value.
  • Dragging anywhere on the control updates continuously.

Example

use gpui::ElementId;
use yororen_ui::component::slider;

let view = slider()
    .key(ElementId::from(("settings", "volume")))
    .range(0.0, 100.0)
    .step(1.0)
    .value(50.0)
    .on_change(|value, _window, _cx| {
        // value: f32
    });

Clone this wiki locally