HTML fragments replace a client application layer
htmx adds request and swap behavior to ordinary elements. A button can issue a POST, a form can target one region, and a server response can replace that region without a full navigation. The browser still receives HTML, so templates, validation messages, permissions, and rendering rules can remain on the server. This is attractive when a team already has a productive backend and does not want to duplicate those decisions in a JavaScript application.
The quick-start example needs 2 attributes: hx-post chooses the endpoint and hx-swap chooses how the response replaces the button. Other attributes control triggers, targets, history, indicators, and request values. WebSocket and server-sent-event support lives in extensions. The model is easy to read in markup, but a useful application still needs conventions for fragment routes, error responses, loading states, focus, and browser history.
Server-rendered forms benefit more than offline workspaces
htmx is strongest around interactions that already map cleanly to an HTTP exchange. Search results, pagination, dependent form fields, inline editing, modal content, and table filters can return a focused fragment. The server owns the final markup and can use its normal authorization path. Existing pages can adopt one interaction at a time because links and forms remain understandable HTML rather than becoming components in an all-at-once migration.
A browser-heavy editor, diagrammer, or offline workspace has different needs. Frequent local state changes do not naturally belong in round trips that return HTML. Client-side state shared across distant regions can also make swap ownership hard to follow. Alpine.js or a larger client framework may sit beside htmx, but each addition creates another state boundary. If most product logic already lives in the browser, using htmx for transport may make the architecture harder to explain.
What happened when we ran it
Our sandbox cloned commit ad56dff and installed 575 npm packages in 35 seconds. The installed dependency tree used 185 MB. There was no build script or target, so the harness skipped that step rather than inventing one. The test command succeeded in 54 seconds, and npm audit reported 0 known vulnerabilities: 0 critical, 0 high, 0 moderate, and 0 low.
The source checkout was 94.8 MB, with 635 files and about 57,378 lines. It contained a tests directory and 1 CI workflow, but no Dockerfile. Most application users will consume the small distributed browser script instead of this development tree. Contributors, however, need the larger npm toolchain and a local web server because the README's hacking guide runs the browser suite from /test/.
Our run establishes that the supplied test command completed on the measured commit. It did not verify an application's backend fragments, Content Security Policy, keyboard flow, focus restoration, history behavior, or extension mix. Those failures emerge from the contract between markup and server responses. Test representative clicks with JavaScript enabled, then confirm the underlying links and forms still provide an acceptable path where progressive enhancement is part of the promise.
Version 4 is still a beta with active regressions
The latest GitHub release is v4.0.0-beta5, published June 26, 2026, while the README quick start currently points to htmx 2.0.10. That split matters. Teams starting a production project should not treat the newest GitHub tag as an automatic upgrade target. Pin the line selected, read its migration material, and keep browser tests around every custom event, history update, out-of-band swap, and extension.
Recent reports give concrete tests for version 4. Issue 3972 says an HX-Trigger response stopped activating an element listening for that label. Issue 3871 reports that a standalone form-associated custom element lost its submitted value beginning in beta4 and remained broken in beta5. Issue 3966 says hx-push-url="false" was ignored for boosted anchors. These reports are scoped, reproducible reasons to hold an upgrade when an application uses those paths.
Returned HTML keeps security on the server's critical path
A fragment response can contain markup that htmx inserts into the document. That makes output escaping and trusted template boundaries central to the security model. Issue 3616 proposes a swap based on Element.setHTML() and suggests changing the default away from innerHTML as browsers add a sanitizing API. The proposal is not current behavior. Applications should assume that unsafe server output can become unsafe page content and keep untrusted strings inside escaped template contexts.
The same server ownership is also a benefit. Authorization does not need to trust a browser state store, and validation can return the exact form region that failed. A 422 response, an authentication redirect, or a stale fragment still needs an intentional target and status policy. Test error responses directly because a successful 200 demo says little about expired sessions, conflicting edits, or a removed triggering element.
Fresh activity supports stable htmx 2, not blind upgrades
GitHub showed 49,021 stars, 678 combined issues and pull requests, and a last push on August 27, 2026. That count includes pull requests and should not be read as 678 bugs. Current discussions cover both the stable 2.x line and the 4.x beta, which helps explain the volume. Release recency and detailed issue follow-up show an active project, while the beta reports show that activity is still changing behavior.
htmx is an excellent fit when the server can answer interactions with HTML and the team values one rendering system. Our 35-second install and successful 54-second test run make the source easy to evaluate, even though the contributor tree carries 575 packages. Start with a bounded form or table, measure how many special swap rules it needs, and stop if client state begins driving the design. That boundary is clearer than any argument about JavaScript size.

