Dialog Browser Demo

This demo demonstrates how to use htmx to create "Confirm" and "Prompt" dialogs using Bootstrap modals. Instead of using the native browser confirm() or prompt(), we use htmx to load modal content from the server and handle the interactions.

Confirm Dialog

Click the button below to trigger a custom confirmation modal.

Prompt Dialog

Click the button below to trigger a custom prompt modal that asks for input.

Native Browser Confirm (hx-confirm)

htmx also has a built-in hx-confirm attribute that uses the native browser confirmation dialog.