Hx

object Hx(source)

Contains all HTMX attributes.

See Core Attribute Reference and Additional Attribute Reference.

Properties

Link copied to clipboard
const val boost: String

"hx-boost" add progressive enhancement for links and forms.

Link copied to clipboard
const val confirm: String

"hx-confirm" shows a confirm() dialog before issuing a request.

Link copied to clipboard
const val delete: String

"hx-delete" issues a DELETE to the specified URL.

Link copied to clipboard
const val disable: String

"hx-disable" disables htmx processing for the given node and any children nodes.

Link copied to clipboard
const val disabledElt: String

"hx-disabled-elt" adds the disabled attribute to the specified elements while a request is in flight.

Link copied to clipboard
const val disinherit: String

"hx-disinherit" control and disable automatic attribute inheritance for child nodes.

Link copied to clipboard
const val encoding: String

"hx-encoding" changes the request encoding type.

Link copied to clipboard
const val ext: String

"hx-ext" extensions to use for this element.

Link copied to clipboard
const val get: String

"hx-get" issues a GET to the specified URL.

Link copied to clipboard
const val headers: String

"hx-headers" adds to the headers that will be submitted with the request.

Link copied to clipboard
const val history: String

"hx-history" prevent sensitive data being saved to the history cache.

Link copied to clipboard
const val historyElt: String

"hx-history-elt" the element to snapshot and restore during history navigation.

Link copied to clipboard
const val include: String

"hx-include" include additional data in requests.

Link copied to clipboard
const val indicator: String

"hx-indicator" the element to put the htmx-request class on during the request.

Link copied to clipboard
const val inherit: String

"hx-inherit" control and enable automatic attribute inheritance for child nodes if it has been disabled by default.

Link copied to clipboard
const val params: String

"hx-params" filters the parameters that will be submitted with a request.

Link copied to clipboard
const val patch: String

"hx-patch" issues a PATCH to the specified URL.

Link copied to clipboard
const val post: String

"hx-post" issues a POST to the specified URL.

Link copied to clipboard
const val preserve: String

"hx-preserve" specifies elements to keep unchanged between requests.

Link copied to clipboard
const val prompt: String

"hx-prompt" shows a prompt() before submitting a request.

Link copied to clipboard
const val pushUrl: String

"hx-push-url" push a URL into the browser location bar to create history.

Link copied to clipboard
const val put: String

"hx-put" issues a PUT to the specified URL.

Link copied to clipboard
const val replaceUrl: String

"hx-replace-url" replace the URL in the browser location bar.

Link copied to clipboard
const val request: String

"hx-request" configures various aspects of the request.

Link copied to clipboard
const val select: String

"hx-select" select content to swap in from a response.

Link copied to clipboard
const val selectOob: String

"hx-select-oob" select content to swap in from a response, somewhere other than the target (out of band).

Link copied to clipboard
const val swap: String

"hx-swap" controls how content will swap in (outerHTML, beforeend, afterend, …)

Link copied to clipboard
const val swapOob: String

"hx-swap-oob" mark element to swap in from a response (out of band).

Link copied to clipboard
const val sync: String

"hx-sync" control how requests made by different elements are synchronized.

Link copied to clipboard
const val target: String

"hx-target" specifies the target element to be swapped.

Link copied to clipboard
const val trigger: String

"hx-trigger" specifies the event that triggers the request.

Link copied to clipboard
const val validate: String

"hx-validate" force elements to validate themselves before a request.

Link copied to clipboard
const val vals: String

"hx-vals" add values to submit with the request (JSON format).

Functions

Link copied to clipboard
fun on(event: String): String

"hx-on:*" handle events with inline scripts on elements.