Sigil

Sheet

A panel that slides in from a side.

GUITUIRuns in the browsersheet

Preview

Sheet, Open, light themeSheet, Open, dark theme

Usage example

fn sheet_demo(open: Signal<bool>) -> NodeBuilder {    container()        .layout(LayoutStyle::flex_column().fill_width().height(268.0))        .child(text("Page behind the sheet").nowrap())        .child(            sheet(open)                .title("Details")                .child(text("A right-edge sheet.").nowrap()),        )}
fn sheet_demo(  open: Signal<bool>,) -> NodeBuilder {  container()    .layout(      LayoutStyle::flex_column()        .fill_width()        .height(268.0),    )    .child(      text("Page behind the sheet")        .nowrap(),    )    .child(      sheet(open)        .title("Details")        .child(          text("A right-edge sheet.")            .nowrap(),        ),    )}

States

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

  • Sheet, Default, light themeSheet, Default, dark theme
    Default
  • Sheet, Open, light themeSheet, Open, dark theme
    Open

API

NameSignaturePurpose
sheetfn sheet(show: Signal<bool>) -> ModalBuilderA panel that slides in from a side.
ModalBuilder`struct ModalBuilder`; `close_button(bool)`; `ModalBuilder::new(Signal<bool>)`, `title(text)`, `child(impl IntoNode)`, `footer(impl IntoNode)`, `actions(cancel, confirm)`, `side(Side)`, `escape_closes(bool)`, `dismiss_on_backdrop(bool)`, `trap(bool)`; width with `WidgetLayoutExt::width`Builder of a modal or sheet. A titled dialog shows a close button that sets show to false; close_button(false) removes it. Children scroll in a body between the title and the footer, so the title and actions stay visible when the dialog reaches its maximum height. footer adds one node to the footer; actions(cancel, confirm) adds two. Escape closes the dialog by default. A click on the backdrop closes a sheet but not a modal, unless dismiss_on_backdrop changes it. trap(false) lets focus leave the dialog.