A modal dialog that interrupts the user with important content and expects a response. Built with native <dialog> + showModal().

Basic (Client-only)

Opens and closes entirely in JavaScript. No server round-trip. Uses show_dialog/1 and hide_dialog/1 helpers.

Are you absolutely sure?

This action cannot be undone. This will permanently delete your account and remove your data from our servers.

With Form

Server-controlled dialog containing a form. Uses the :if + show pattern.

Server-controlled

Server opens and closes the dialog. Demonstrates on_cancel={JS.push(...)} for server notification on dismiss.

Server state: show=false, result=nil

Custom Footer

Shows dialog_close wrapping a button in the footer, alongside other action buttons.

By using this service, you agree to our terms and conditions. This includes respecting other users, not misusing the platform, and maintaining the security of your account.

Scrollable Content

Dialog with long content that scrolls internally.

MIT License

Full license text below.

Copyright (c) 2024 PhxShadcn

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.