HxAttributes

class HxAttributes(val map: DelegatingMap) : StringMapDelegate(source)

Typed accessors for the HTMX (hx-*) attributes understood by the htmx.org client library.

Report a problem

See also

Constructors

Link copied to clipboard
constructor(map: DelegatingMap)

Types

Link copied to clipboard
value class On(attributes: MutableMap<String, String>)

Typed access to the hx-on:* event handler attributes of a tag.

Properties

Link copied to clipboard

Adds progressive enhancement for links and forms.

Link copied to clipboard

Shows a confirm() dialog before issuing a request.

Link copied to clipboard

Issues a DELETE to the specified URL.

Link copied to clipboard

Disables htmx processing for the given node and any children nodes.

Link copied to clipboard

Adds the disabled attribute to the specified elements while a request is in flight.

Link copied to clipboard

Controls and disables automatic attribute inheritance for child nodes.

Link copied to clipboard

Changes the request encoding type.

Link copied to clipboard
var ext: String?

Extensions to use for this element.

Link copied to clipboard
var get: String?

Issues a GET to the specified URL.

Link copied to clipboard

Prevents sensitive data from being saved to the history cache.

Link copied to clipboard

Specifies the element to snapshot and restore during history navigation.

Link copied to clipboard

Includes additional data in requests.

Link copied to clipboard

Specifies the element to put the htmx-request class on during the request.

Link copied to clipboard

Controls and enables automatic attribute inheritance for child nodes if it has been disabled by default.

Link copied to clipboard
open override val map: DelegatingMap
Link copied to clipboard

Provides typed access to the hx-on:* event handler attributes of this tag.

Link copied to clipboard

Filters the parameters that will be submitted with a request.

Link copied to clipboard

Issues a PATCH to the specified URL.

Link copied to clipboard
var post: String?

Issues a POST to the specified URL.

Link copied to clipboard

Specifies elements to keep unchanged between requests.

Link copied to clipboard

Shows a prompt() before submitting a request.

Link copied to clipboard

Pushes a URL into the browser location bar to create history.

Link copied to clipboard
var put: String?

Issues a PUT to the specified URL.

Link copied to clipboard

Replaces the URL in the browser location bar.

Link copied to clipboard

Configures various aspects of the request.

Link copied to clipboard

Selects content to swap in from a response.

Link copied to clipboard

Selects content to swap in from a response, somewhere other than the target (out of band).

Link copied to clipboard
var swap: String?

Controls how content will swap in (outerHTML, beforeend, afterend, …).

Link copied to clipboard

Marks element to swap in from a response (out of band).

Link copied to clipboard
var sync: String?

Controls how requests made by different elements are synchronized.

Link copied to clipboard

Specifies the target element to be swapped.

Link copied to clipboard

Specifies the event that triggers the request.

Link copied to clipboard

Forces elements to validate themselves before a request.

Link copied to clipboard
var vals: String?

Adds values to submit with the request (JSON format).

Link copied to clipboard
var vars: String?

Adds values dynamically to the parameters to submit with the request (deprecated, please use hx-vals).

Functions

Link copied to clipboard
open operator override fun get(key: String): String?
Link copied to clipboard
fun on(event: String, script: String)

Handles the given event with the inline script on this tag.

Link copied to clipboard
open override fun remove(key: String): String?
Link copied to clipboard
open operator override fun set(key: String, value: String)