Skip to main content

run_inline

Function run_inline 

Source
pub fn run_inline(height: u32, f: impl FnMut(&mut Context)) -> Result<()>
Available on crate feature crossterm only.
Expand description

Run the TUI in inline mode with default configuration.

Renders height rows directly below the current cursor position without entering alternate screen mode. Useful for CLI tools that want a small interactive widget below the prompt.

height is the reserved inline render area in terminal rows. The rest of the terminal stays in normal scrollback mode.

§Example

fn main() -> std::io::Result<()> {
    slt::run_inline(3, |ui| {
        ui.text("Inline TUI — no alternate screen");
    })
}