htmx/www/content/attributes/hx-prompt.md
2023-03-18 11:29:38 -04:00

419 B

+++ title = "hx-prompt" +++

The hx-prompt attribute allows you to show a prompt before issuing a request. The value of the prompt will be included in the request in the HX-Prompt header.

Here is an example:

<button hx-delete="/account" hx-prompt="Enter your account name to confirm deletion">
  Delete My Account
</button>

Notes

  • hx-prompt is inherited and can be placed on a parent element