input_select

Function input_select 

Source
pub fn input_select(id: &str, options: &[&str], default: usize) -> String
Expand description

Create a dropdown select widget.

Returns the currently selected option as a string. When the user selects a different option, the cell automatically re-executes.

§Arguments

  • id - Unique identifier for this widget within the cell
  • options - List of available options
  • default - Index of the default selection (0-based)

§Example

let mode = venus::input_select("mode", &["Fast", "Normal", "Slow"], 1);
println!("Selected mode: {}", mode);