tawasuyu

tawasuyu/llimphi

Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.

Rust 660Markdown 302TOML 157RON 312382 Definiciones

⎇ c5a232cf24788ab75a850ffe81eca5a7af50e2f8 widgets/modal/README.md Markdown · 24 líneas · 724 B Historia crudo

chore: refresco desde el monorepo — 27 crates nuevos (anim, lottie, svg, mesh, image, layer, test, wire-view, widgets rag-sidebar/router/lazy-list/rive-button) y sync de los 95 existentes 93253cc22 · Sergio ·

1# llimphi-widget-modal
2
3Generic centred dialog with a scrim.
4
5Different from the `context-menu` (small, anchored to a click): the modal takes a
6central region of configurable size, presents a title, an arbitrary body (built
7by the app) and a button bar.
8
9Typical use:
10
111. The app keeps `Option<ModalState>` in its model.
122. `view_overlay` returns `Some(modal_view(spec))` while there is state, `None`
13   once it is closed.
143. The app captures `Esc` in `on_key` → close; `Enter` → primary.
15
16Three button severities:
17
18- `Primary` — green/accent, the main action.
19- `Cancel` — neutral, dismisses.
20- `Destructive` — red, irreversible action (delete, etc).
21
22---
23
24Part of **llimphi** — see [llimphi](../../README.md).

README.md

llimphi-widget-modal

Generic centred dialog with a scrim.

Different from the context-menu (small, anchored to a click): the modal takes a central region of configurable size, presents a title, an arbitrary body (built by the app) and a button bar.

Typical use:

  1. The app keeps Option<ModalState> in its model.
  2. view_overlay returns Some(modal_view(spec)) while there is state, None once it is closed.
  3. The app captures Esc in on_key → close; Enter → primary.

Three button severities:


Part of llimphi — see llimphi.