HTMX reference attributes ¶
Warning
you can use the data- prefix on all hx-* attributes
AJAX
- HTMX hx-boost allows you to “boost” normal anchors and form tags to use AJAX instead
- HTMX hx-delete attribute (will cause an element to issue a DELETE to the specified URL and swap the HTML into the DOM using a swap strategy)
- HTMX hx-disinherit attribute (allows you to control the automatic attribute inheritance)
- HTMX hx-get attribute (will cause an element to issue a GET to the specified URL and swap the HTML into the DOM using a swap strategy)
- HTMX hx_headers attribute (allows you to add to the headers that will be submitted with an AJAX request)
- HTMX hx-include attribute (allows you to include additional element values in an AJAX request)
- HTMX hx-post attribute (will cause an element to issue a POST to the specified URL and swap the HTML into the DOM using a swap strategy)
- HTMX hx-put attribute (will cause an element to issue a PUT to the specified URL and swap the HTML into the DOM using a swap strategy)
- HTMX hx-patch attribute (will cause an element to issue a PATCH to the specified URL and swap the HTML into the DOM using a swap strategy)
- HTMX hx-params attribute (allows you to filter the parameters that will be submitted with an AJAX request)
- HTMX hx-request allows you to configure various aspects of the request via the following attributes
- HTMX hx-sync attribute (allows you to specify how the response will be swapped in relative to the target of an AJAX request)
- HTMX hx-trigger attribute (allows you to specify what triggers an AJAX request)
HTML
- HTMX hx-confirm allows you to confirm an action before issuing a request
- HTMX hx-swap attribute (allows you to specify how the response will be swapped in relative to the target of an AJAX request)
- HTMX hx-swap-oob allows you to specify that some content in a response should be swapped into the DOM somewhere other than the target, that is “Out of Band”
- HTMX hx-target attribute (allows you to target a different element for swapping than the one issuing the AJAX request)
- HTMX hx-select attribute allows you to select the content you want swapped from a response
Response Headers Reference