A single HTTP attribute can now replace hundreds of lines of JavaScript. HTMX, a lightweight library created by computer science professor Carson Gross, is gaining traction as an alternative to heavyweight frameworks like React. One company reported cutting 67% of their React code after switching to HTMX.
HTMX is tiny — just 16 kilobytes with zero dependencies, compared to React and React DOM's 45 kilobytes for the core alone. It operates on a simple principle: request, response, swap. Any HTML element can trigger an HTTP request (via hx-get or hx-post), specify which element to update with hx-target, and control how the response is inserted with hx-swap.
"Every action becomes a network request" — a trade-off that works brilliantly for forms, dashboards, and CRUD apps, but not for spreadsheets, live maps, or highly interactive widgets.
The results can be dramatic. Contact, a company that rewrote their React app in HTMX, saw:
- Code reduction: 67% less code
- Dependencies: 255 JavaScript packages down to 9
- Build times: nearly 90% faster
With 48,000 GitHub stars and ranking as one of the most admired tools in developer surveys, HTMX is clearly not just hype. Yet it's not a React killer — it's a solution for the "other 90%" of web apps that don't need a full SPA. Enterprise adoption lags behind solo and side projects, and the reliance on network requests can be a drawback on slow connections.
So, is HTMX a genuine breakthrough or just jQuery with better marketing? The community verdict leans toward breakthrough — but for the right use cases.