1# llimphi-widget-modal23Generic centred dialog with a scrim.
45Different 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.
89Typical use:
10111. 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.
1516Three button severities:
1718- `Primary` — green/accent, the main action.
19- `Cancel` — neutral, dismisses.
20- `Destructive` — red, irreversible action (delete, etc).
2122---
2324Part 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:
The app keeps Option<ModalState> in its model.
view_overlay returns Some(modal_view(spec)) while there is state, None
once it is closed.
The app captures Esc in on_key → close; Enter → primary.