Modal

Renders a modal.

Read more Read less

Examples

<.modal id="confirm-modal" title="My Title" action_title="My Action" on_action={JS.push("submit")}>
  This is a modal.
</.modal>
Attribute Type Documentation Default Value
Required id * :string
Required title * :string
action_title :string
action_disabled :boolean false
action_disable_with :string
class :any []
destructive :boolean false
hide_cancel :boolean false
hide_footer :boolean false
show :boolean false
on_action %JS{} %Phoenix.LiveView.JS{ops: []}
on_cancel %JS{} %Phoenix.LiveView.JS{ops: []}
accept_push_events :boolean

Attach listeners for server events.

Read more Read less
false
Required inner_block * :slot
description :slot
<:description>Description goes here</:description>
<.simple_form for={%{id: "example"}} actions_layout="cluster" data-test-id="modal-content">
  <.input name="Name" value="" label="Name" />
  <.input name="Email" value="" label="Email" />
</.simple_form>
actions :slot