overlays
dialog
Dialog
Accessible modal with focus trap.
$
Component docs
ndui add dialog
Confirm + form dialog
Delete account?
This will permanently remove your account, all projects, and uploaded files. This action cannot be undone.
New project
Source
<Dialog Id="confirm_delete" Title="Delete account?">
<Body>This will permanently remove your account... </Body>
<Footer>
<Button Variant="Ghost" OnClick="() => close()">Cancel</Button>
<Button Variant="Destructive" OnClick="OnDelete">Yes, delete</Button>
</Footer>
</Dialog>
@* Open from anywhere: *@
<Button @onclick="@(() => Alpine.Dispatch("dialog-open", new { id = "confirm_delete" }))">
Delete account
</Button>