input_slider

Function input_slider 

Source
pub fn input_slider(id: &str, min: f64, max: f64, default: f64) -> f64
Expand description

Create a numeric slider widget.

Returns the current slider value (set by user or default). When the user moves the slider, the cell automatically re-executes.

§Arguments

  • id - Unique identifier for this widget within the cell
  • min - Minimum slider value
  • max - Maximum slider value
  • default - Default value when first rendered

§Example

let speed = venus::input_slider("speed", 0.0, 100.0, 50.0);
println!("Current speed: {}", speed);