htmx.config.requestClass
Sets class applied during requests
The htmx.config.requestClass option sets the CSS class htmx adds while a request is running.
htmx adds it to the element selected by hx-indicator. Without hx-indicator, htmx adds it to the request source.
Default: "htmx-request"
Syntax
Use a custom request-state class:
<meta name="htmx-config" content='requestClass:"is-loading"'>
.is-loading {
opacity: 0.5;
} htmx removes the class when the request ends.
See Also
Licensed under the Zero-Clause BSD License.
https://four.htmx.org/reference/config/htmx-config-requestClass/