Dialog
Storybook
A modal dialog that interrupts the user with important content and expects a response.
Built with native <dialog> + showModal().
Basic (Client-only)
Opens and closes entirely in JavaScript. No server round-trip.
Uses show_dialog/1 and hide_dialog/1 helpers.
With Form
Server-controlled dialog containing a form. Uses the :if +
show pattern.
Server-controlled
Server opens and closes the dialog. Demonstrates
on_cancel={JS.push(...)} for server notification on dismiss.
Server state:
show=false, result=nil
Custom Footer
Shows dialog_close wrapping a button in the footer,
alongside other action buttons.
Scrollable Content
Dialog with long content that scrolls internally.