Shadix

Dialog

A modal dialog, client-driven via JS commands and the ShadixDialog hook.

<.dialog></.dialog>

Examples

Basic

Trigger, header, and footer.

<.dialog id="example-dialog">
  <:trigger><.button variant="outline">Open</.button></:trigger>
  <.dialog_header>
    <.dialog_title id="example-dialog">Are you sure?</.dialog_title>
    <.dialog_description id="example-dialog">This action cannot be undone.</.dialog_description>
  </.dialog_header>
  <.dialog_footer>
    <.button variant="destructive">Delete</.button>
  </.dialog_footer>
</.dialog>

Props

Name Type Default Values
class :string
id :string
inner_block (slot) :slot
trigger (slot) :slot