PhoenixDuskmoon.Component.Feedback.Dialog (PhoenixDuskmoon v9.0.1)
View SourceModal dialog component using el-dm-dialog custom element.
Examples
<.dm_modal>
<:trigger :let={dialog_id}>
<.dm_btn onclick={"#{dialog_id}.showModal()"}>Open</.dm_btn>
</:trigger>
<:title>PhoenixDuskmoon</:title>
<:body>Modal content here</:body>
<:footer>
<.dm_btn>Close</.dm_btn>
</:footer>
</.dm_modal>
Summary
Functions
Renders a modal dialog.
Functions
Renders a modal dialog.
Examples
<.dm_modal>
<:trigger :let={dialog_id}>
<button type="button" onclick={"#{dialog_id}.showModal()"}>Open</button>
</:trigger>
<:title>Modal Title</:title>
<:body>Modal body content</:body>
</.dm_modal>Attributes
id(:any) - Modal id.class(:any) - Additional CSS classes. Defaults tonil.hide_close(:boolean) - Hide the close button. Defaults tofalse.position(:string) - Modal position. Defaults tonil. Must be one ofnil,"top","middle", or"bottom".backdrop(:boolean) - Apply backdrop blur effect. Defaults tofalse.size(:string) - Modal size. Defaults tonil. Must be one ofnil,"xs","sm","md","lg", or"xl".responsive(:boolean) - Make modal responsive. Defaults tofalse.no_backdrop(:boolean) - Hide the backdrop overlay. Defaults tofalse.close_label(:string) - Accessible label for the close button. Defaults to"Close".dialog_label(:string) - Accessible fallback label when no title slot is provided (i18n). Defaults to"Dialog".- Global attributes are accepted.
Slots
trigger- Element that opens the modal. Accepts attributes:class(:any) - trigger wrapper CSS classes.
title- Modal title. Accepts attributes:class(:any) - title container CSS classes.
body(required) - Modal content. Accepts attributes:class(:any) - body container CSS classes.
footer- Modal footer with actions. Accepts attributes:class(:any) - footer container CSS classes.