HtmxHelper
Instance methods
alpine_events
Helper for building Alpine event attributes that need string interpolation Usage: alpine_events({"@open-modal-#{id}.window" => "open()"})
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()
htmx_refresh
Source