A panel over one side of the window.
Installation
Components are distributed as source. Copy it and what it depends on into your project, then change it as you need:
cargo run --release --bin amenui -- add sheet --to ../my-appFiles copied: src/widgets/sheet.rs, src/widgets/mod.rs, src/widgets/button.rs
Usage
use amenui::widgets::{sheet};
fn view() -> El<Msg> {
sheet("sh1", false, "筛选", 320.0, Msg::Nothing, text("条件", 13.0, Paint::TEXT))
}API
| Functions | sheet |
|---|---|
| Props | key, open, title, width, close, body. |
| Files | src/widgets/sheet.rs |
| Depends on | base, button |
| Response to fronts | nudge (a control: pushed as one piece by fronts, held and condensing at most to Look::legible_cap) |
| Recomposition | keyed labels recompose when their text changes |
Keyboard and accessibility
| States | closed, open (modal: focus inside, Esc closes; the page beneath held a little loose). |
|---|---|
| Keys and messages | close on Esc, a press on the page beside it, or its close button. |
On the web every control is mirrored into the page as an element with its role and name, so screen readers and the browser's own focus see it (DESIGN.md §1.14).