Click to Open Popup

Clientside Interactivityframework/ui ↗

Click a button → server confirms → a modal pops up. No JavaScript needed.

Live

A user submits a form or clicks an action, and on success a drawer or modal should appear — showing the result, a confirmation, or a next-step form. This is the "do X, then show Y" pattern.

Add data-fui-rpc-open="widget-name" alongside data-fui-rpc. When the server returns 2xx, the runtime opens the named widget. The widget is pre-registered with widget.Mount at app startup; the RPC just triggers the reveal.

interactive.OnClick(
    render.Tag("button", nil, render.Text("Confirm")),
    interactive.Post("/api/action").
        OnSuccess(interactive.OpenWidget("result-modal")),
)
Live

Click — a modal pops up after the POST succeeds.