htmx/www/attributes/hx-prompt.md
acnebs d01025823e Rename custom HTTP headers to no longer start with X-
This convention is deprecated, as per this RFC from the IETF: 
https://tools.ietf.org/html/rfc6648
2020-05-28 01:29:51 +01:00

462 B

layout title
layout.njk </> htmx - hx-prompt

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 requst 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