Modal

Renders a modal.

Read more Read less

Examples

<.modal id="confirm-modal">
  This is a modal.
</.modal>

JS commands may be passed to the :on_cancel to configure the closing/cancel event, for example:

<.modal id="confirm" on_cancel={JS.navigate(~p"/posts")}>
  This is another modal.
</.modal>
<.modal id="modal-single-default">
  Modal body
  <.dialog_footer>
      <.button type="submit">Cancel</.button>
  </.dialog_footer>
</.modal>