module

HtmxHelper

Instance methods

alpine_events

Helper for building Alpine event attributes that need string interpolation Usage: alpine_events({"@open-modal-#{id}.window" => "open()"})

Source
attrs

Universal attributes helper - combines htmx, Alpine, and regular HTML attributes Usage: attrs(class: "btn", hx_get: "/path", hx_target: "#result", x_data: "{}", **alpine_attrs) For Alpine event handlers with interpolation, pass them separately with .merge()

Source
htmx_current_url

Get current URL from htmx

Source
htmx_redirect(url : String)

Respond with htmx-specific headers

Source
htmx_refresh
Source
htmx_request?

Check if request is from htmx

Source
htmx_success_message(message : String)
Source
htmx_trigger_event(event_name : String, detail : Hash | Nil = nil)
Source
htmx_trigger_name

Get htmx trigger element

Source
hx_attrs

Combine multiple htmx attributes

Source
hx_confirm(message : String)
Source
hx_delete(url : String)
Source
hx_get(url : String)

Add htmx attributes to HTML elements

Source
hx_indicator(selector : String)
Source
hx_post(url : String)
Source
hx_put(url : String)
Source
hx_swap(strategy : String)
Source
hx_target(selector : String)
Source
hx_trigger(event : String)
Source
hx_vals(hash : Hash)
Source