Trait HtmxAttributes

Source
pub trait HtmxAttributes: GlobalAttributes {
Show 35 associated constants and 0 method const hx_get: Attribute = Attribute; const hx_post: Attribute = Attribute; const hx_on: AttributeNamespace = AttributeNamespace; const hx_push_url: Attribute = Attribute; const hx_select: Attribute = Attribute; const hx_select_oob: Attribute = Attribute; const hx_swap: Attribute = Attribute; const hx_swap_oob: Attribute = Attribute; const hx_target: Attribute = Attribute; const hx_trigger: Attribute = Attribute; const hx_vals: Attribute = Attribute; const hx_boost: Attribute = Attribute; const hx_confirm: Attribute = Attribute; const hx_delete: Attribute = Attribute; const hx_disable: Attribute = Attribute; const hx_disabled_elt: Attribute = Attribute; const hx_disinherit: Attribute = Attribute; const hx_encoding: Attribute = Attribute; const hx_ext: Attribute = Attribute; const hx_headers: Attribute = Attribute; const hx_history: Attribute = Attribute; const hx_history_elt: Attribute = Attribute; const hx_include: Attribute = Attribute; const hx_indicator: Attribute = Attribute; const hx_inherit: Attribute = Attribute; const hx_params: Attribute = Attribute; const hx_patch: Attribute = Attribute; const hx_preserve: Attribute = Attribute; const hx_prompt: Attribute = Attribute; const hx_put: Attribute = Attribute; const hx_replace_url: Attribute = Attribute; const hx_request: Attribute = Attribute; const hx_sync: Attribute = Attribute; const hx_validate: Attribute = Attribute; const hx_vars: Attribute = Attribute;
}
Available on crate feature htmx only.
Expand description

Use HTMX attributes in your HTML elements. Attributes for HTMX elements.

HTMX Reference

Provided Associated Constants§

Source

const hx_get: Attribute = Attribute

Issues a GET to the specified URL

Source

const hx_post: Attribute = Attribute

Issues a POST to the specified URL

Source

const hx_on: AttributeNamespace = AttributeNamespace

Handle events with inline scripts on elements

Source

const hx_push_url: Attribute = Attribute

Push a URL into the browser location bar to create history

Source

const hx_select: Attribute = Attribute

Select content to swap in from a response

Source

const hx_select_oob: Attribute = Attribute

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

Source

const hx_swap: Attribute = Attribute

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

Source

const hx_swap_oob: Attribute = Attribute

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

Source

const hx_target: Attribute = Attribute

Specifies the target element to be swapped

Source

const hx_trigger: Attribute = Attribute

Specifies the event that triggers the request

Source

const hx_vals: Attribute = Attribute

Add values to submit with the request (JSON format)

Source

const hx_boost: Attribute = Attribute

Add progressive enhancement for links and forms

Source

const hx_confirm: Attribute = Attribute

Shows a confirm() dialog before issuing a request

Source

const hx_delete: Attribute = Attribute

Issues a DELETE to the specified URL

Source

const hx_disable: Attribute = Attribute

Disables htmx processing for the given node and any children nodes

Source

const hx_disabled_elt: Attribute = Attribute

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

Source

const hx_disinherit: Attribute = Attribute

Control and disable automatic attribute inheritance for child nodes

Source

const hx_encoding: Attribute = Attribute

Changes the request encoding type

Source

const hx_ext: Attribute = Attribute

Extensions to use for this element

Source

const hx_headers: Attribute = Attribute

Adds to the headers that will be submitted with the request

Source

const hx_history: Attribute = Attribute

Prevent sensitive data being saved to the history cache

Source

const hx_history_elt: Attribute = Attribute

The element to snapshot and restore during history navigation

Source

const hx_include: Attribute = Attribute

Include additional data in requests

Source

const hx_indicator: Attribute = Attribute

The element to put the htmx-request class on during the request

Source

const hx_inherit: Attribute = Attribute

Control and enable automatic attribute inheritance for child nodes if it has been disabled by default

Source

const hx_params: Attribute = Attribute

Filters the parameters that will be submitted with a request

Source

const hx_patch: Attribute = Attribute

Issues a PATCH to the specified URL

Source

const hx_preserve: Attribute = Attribute

Specifies elements to keep unchanged between requests

Source

const hx_prompt: Attribute = Attribute

Shows a prompt() before submitting a request

Source

const hx_put: Attribute = Attribute

Issues a PUT to the specified URL

Source

const hx_replace_url: Attribute = Attribute

Replace the URL in the browser location bar

Source

const hx_request: Attribute = Attribute

Configures various aspects of the request

Source

const hx_sync: Attribute = Attribute

Control how requests made by different elements are synchronized

Source

const hx_validate: Attribute = Attribute

Force elements to validate themselves before a request

Source

const hx_vars: Attribute = Attribute

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§