-
v4.0.0 Stable
released this
2026-09-01 00:27:59 +00:00 | 0 commits to htmx-v4 since this releaseThis is the first release in the htmx v4.x series! See the project's release notes for all the details. While the majority of new features and breaking changes are dependent on htmx, there are a few highlighted below.
NEW FEATURE - Inheritance in htmx v4 is explicit rather than implicit; trees do not inherit
hx-tags unless they end with:inherited. View Engine has anhxInheritedfunction that will append this to any attribute. (ex.hxInherited (_hxAction "/go/here")will generatehx-action:inherited="/go/here")NEW FEATURE - htmx v4 has a robust extension ecosystem, with some v2 core functionality split out to extensions (most notably SSE). htmx is also now distributing an
htmax.jsfile which bundles htmx and some common extensions. Both server and view engine support both packages; see the package READMEs for more information.BREAKING CHANGE - htmx has changed, renamed, or dropped several of its attributes and events. These libraries have been updated to reflect these changes. If they cause issues, a good way to determine what needs to be changed is installing v4.0.0-beta5. That version still has the obsolete elements, but they will generate warnings with (where applicable) what to do to prepare for v4. Once the warnings are gone, you should be clear to return to this version.
BREAKING CHANGE - Explicit inheritance may very well break your client-side experience, even if things compile. If you have used JavaScript to hook into the htmx event cycle, that will likely change as well;
fetchbehaves much differently thanXMLHTTPRequest. Please read the migration info provided by the htmx project; they have some techniques to ease the transition between v2.x and v4.x.Downloads