Sigil

Interactive

Make any node hoverable, pressable, and focusable.

GUITUIRuns in the browserinteractive

Preview

Interactive, Default, light themeInteractive, Default, dark theme

Usage example

fn interactive_demo() -> InteractiveBuilder {    interactive(        container()            .layout(LayoutStyle::flex_column().fill_width())            .child(text("Interactive row").nowrap().font_size(14.0)),    )    .focusable(true)    .rounded(Radius::Md)}
fn interactive_demo()-> InteractiveBuilder {  interactive(    container()      .layout(        LayoutStyle::flex_column()          .fill_width(),      )      .child(        text("Interactive row")          .nowrap()          .font_size(14.0),      ),  )  .focusable(true)  .rounded(Radius::Md)}

States

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

  • Interactive, Default, light themeInteractive, Default, dark theme
    Default
  • Interactive, Hover, light themeInteractive, Hover, dark theme
    Hover
  • Interactive, Pressed, light themeInteractive, Pressed, dark theme
    Pressed
  • Interactive, Focused, light themeInteractive, Focused, dark theme
    Focused
  • Interactive, Disabled, light themeInteractive, Disabled, dark theme
    Disabled

API

NameSignaturePurpose
interactivefn interactive(inner: NodeBuilder) -> InteractiveBuilderMake any node hoverable, pressable, and focusable.