The htmx.config.indicatorClass option sets the CSS class used to mark loading indicator content.
Add this class in your markup:
<img id="spinner" class="htmx-indicator" alt="Loading">
htmx does not add the class. Built-in indicator CSS hides it until requestClass marks the indicator or an ancestor as active.
Default: "htmx-indicator"
Usage
Use a custom class:
<meta name="htmx-config" content='indicatorClass:"loading"'> <img id="spinner" class="loading" alt="Loading">