Sigil

Terminal

A terminal transcript with an input line.

GUITUIRuns in the browserterminal

Preview

Terminal, Default, light themeTerminal, Default, dark theme

Usage example

fn terminal_demo() -> NodeBuilder {    let lines = vec![        String::from("$ cargo build"),        String::from("   Compiling sigil-ui v0.1.0"),        String::from("    Finished dev profile"),    ];    container()        .layout(LayoutStyle::flex_column().fill_width().height(120.0))        .child(terminal(signal(lines), |_| {}))}
fn terminal_demo() -> NodeBuilder {  let lines = vec![    String::from("$ cargo build"),    String::from(      "   Compiling sigil-ui v0.1.0",    ),    String::from(      "    Finished dev profile",    ),  ];  container()    .layout(      LayoutStyle::flex_column()        .fill_width()        .height(120.0),    )    .child(terminal(      signal(lines),      |_| {},    ))}

States

All 4 captured states, each drawn by the window host and by the terminal host.

  • Terminal, Default, light themeTerminal, Default, dark theme
    Default
  • Terminal, Hover, light themeTerminal, Hover, dark theme
    Hover
  • Terminal, Pressed, light themeTerminal, Pressed, dark theme
    Pressed
  • Terminal, Focused, light themeTerminal, Focused, dark theme
    Focused

API

NameSignaturePurpose
terminalfn terminal(lines: Signal<Vec<String>>, on_input: impl Fn(String) + 'static) -> NodeBuilderA terminal transcript with an input line.