Technology & AI
Editorial Research

By · Published · Updated

HTMX is the surprising tech powering the web's future

How a 14KB library born from jQuery nostalgia became the unlikely catalyst for a quiet revolution in how developers think about building for the browser.

Key Takeaways · Quick Answers
What is HTMX and how does it differ from React or Vue?
HTMX is a 14KB gzipped JavaScript library that extends HTML with attributes for making HTTP requests and updating the DOM. Unlike React or Vue, which require a build step, state management library, and JSON API layer, HTMX returns HTML fragments directly from the server and swaps them into the page. The server remains the single source of truth for UI state and validation.
What is the hypermedia approach that HTMX is built on?
HTMX is built on HATEOAS (Hypermedia As The Engine Of Application State), the principle that the server should drive application state through HTML more than through JSON exchanged with a client-side state machine. This is how the web originally worked, with links and forms as the engine of application state. HTMX modernizes that model with AJAX, partial updates, and event triggers so developers no longer have to reload the whole page for every interaction.
How did HTMX originate and what was its earlier name?
HTMX began life as intercooler.js, a library built around jQuery that added behavior based on HTML attributes. The project evolved over time, eventually being renamed to HTMX. The htmx team has explicitly stated they want to emulate jQuery's technical characteristics: easy to add to a project, consistent API, and the ability to use as much or as little of it as you like without dictating your application's structure.
What is the AHA Stack?
The AHA Stack refers to Astro, HTMX, and Alpine.js used together. Astro handles static page rendering at build time, HTMX handles interactive parts by swapping in server-rendered fragments on demand, and Alpine.js handles simple client-side logic like toggles and dropdowns. This combination allows full-stack developers to manage both UI and business logic in a single server-side language without a JavaScript-first architecture.
What changes came with HTMX 2.0?
HTMX 2.0, released in October 2025, brought a smaller bundle, a better extension system, and improved support for Server-Sent Events (SSE). The release also formalized the project's philosophy of stability as a feature, with quarterly releases, backwards compatibility commitments, and a stated intention to avoid adding new core features. The team has said that HTMX written in 2025 should look very similar to HTMX written in 2035.

HTMX is a JavaScript library that allows developers to access modern browser features directly from HTML, rather than relying heavily on JavaScript frameworks. This approach building dynamic user interfaces with server-rendered HTML represents a significant departure from the complex client-side architectures dominant for the last decade. As the drawbacks of increasingly bloated JavaScript applications become clear, HTMX offers a compelling path towards faster, more resilient, and more maintainable web experiences.

That satisfaction is at the heart of HTMX's unexpected rise. What began as a modest attempt to bring hypermedia patterns back to modern web development has, by 2026, become something of a movement a rejection of the received wisdom that building interactive web applications requires a JavaScript framework, a build step, a state management library, and a JSON API layer.

The Library That Shouldn't Have Mattered

HTMX is, at its core, a 14KB gzipped JavaScript library. It does one thing: it extends HTML so that any element not just anchors and forms can trigger HTTP requests and update the DOM with the server's response. That is the entire pitch. No virtual DOM. No component model. No opinion about how you structure your backend.

The library traces its lineage to intercooler.js, a project built around jQuery that added behavior through HTML attributes. For developers who remember the pre-framework era of web development, this will sound familiar because it is essentially what jQuery did, updated for an age when AJAX is ubiquitous and browser APIs have matured.

"htmx is the New jQuery," reads an official essay on the project's website. "Now, that's a ridiculous statement to make, of course, but it is an ideal that we on the htmx team are striving for."

The comparison is deliberate. jQuery remains in use on an estimated 75% of all public websites a number that dwarfs all other JavaScript tools despite being frequently dismissed as legacy software. The htmx team points to three technical reasons for jQuery's enduring presence: it is easy to add to a project with a single dependency-free link, it has maintained a consistent API remaining largely backwards compatible over its life, and it stays out of the way otherwise, not dictating the structure of your application. HTMX aspires to the same properties.

The official roadmap, published in January 2025, makes this ambition explicit. "We want htmx to be a useful tool for exactly that use case," the essay states. "Websites that are built with jQuery stay online for a very long time, and websites built with htmx should be capable of the same (or better)."

What Hypermedia Actually Means

To understand why HTMX has found its audience, it helps to understand the architectural problem it solves. For more than a decade, the frontend world operated on a shared assumption: you needed React, or Vue, or Angular, or Svelte. You needed a build step, a bundler, a node_modules folder, a state management library, and an API layer that serialized everything to JSON.

This approach call it the JSON-Data-API model created what practitioners began calling the "double bookkeeping" problem. Validation, routing, and state management had to be duplicated on both sides of the network. The server sent raw data; the client turned that data into HTML. When something changed in the data model, both the API and the frontend component had to be updated in concert.

HTMX flips this script. Instead of sending JSON, the server sends HTML fragments. When a user clicks a button or submits a form, HTMX swaps that HTML directly into the DOM. The server remains the single source of truth for UI state and validation.

"At its core, HTMX is a 14KB library that returns the web to its original roots: hypermedia systems," writes ZenrioTech in a 2026 analysis of the hypermedia-driven architecture. "The htmx hypermedia-driven architecture flips this script. Instead of sending JSON, the server sends HTML fragments."

This approach is not new. It is, in fact, the original model of the web. The term HATEOAS Hypermedia As The Engine Of Application State comes from Roy Fielding's doctoral dissertation on REST, published in 2000. Fielding described a web where links and forms drive application state, not client-side state machines synchronized with server-side APIs.

What HTMX did was modernize that model. It added AJAX, partial updates, and event triggers so that developers no longer have to reload the whole page for every interaction. But it kept the fundamental principle: the server drives the UI through HTML.

The Numbers Behind the Movement

The hypermedia renaissance is not merely philosophical. It is measurable. In 2024, HTMX added 16.8k GitHub stars, outperforming React by over 4,000 stars in the "Front-end Frameworks" category of the JavaScript Rising Stars report. This was not a niche metric it was a signal that something was shifting in how developers evaluated tools.

A direct comparison by Strapi highlights the practical implications of this divergence. A baseline HTMX installation is roughly 14KB gzipped. A modern React stack often starts at 42KB before you even add a router, state management, or styling libraries. This is not just about disk space it is about the execution cost on the user's device. Reducing the JavaScript payload leads to faster time-to-interactive (TTI) and a better experience on lower-powered devices and slower connections.

The size difference compounds over time. React applications tend to grow as teams add state management libraries, routing solutions, and utility packages. HTMX applications grow too, but they grow on the server side, where the cost of complexity is different in character and easier to manage.

Locality of Behavior: The Developer Experience Argument

Beyond performance metrics, HTMX advocates point to a concept called Locality of Behavior (LoB). The idea is simple: a developer should be able to look at a piece of code and understand exactly what it does without jumping between five different files in a React component folder.

In a traditional React application, understanding a button click might require tracing through a component, its props, a context provider, a reducer, an action creator, an API call, and a response handler. Each of these might live in a different file, written by a different developer, updated at a different time.

With HTMX, the behavior lives in the HTML itself. The hx-post attribute tells you exactly what will happen when the button is clicked. The hx-target attribute tells you where the response will go. The hx-swap attribute tells you how it will be inserted. Everything is visible in the template, in context, without navigating to a separate file.

"LoB is the idea that a developer should be able to look at a piece of code and understand exactly what it does without jumping between five different files in a React component folder," as one analysis put it. "By moving the heavy lifting back to the server, teams are seeing a dramatic Locality of Behavior."

HTMX 2.0 and the Question of Maturity

In October 2025, HTMX 2.0 was released. For a project that had spent years as a curiosity a "clever side project" in the words of technologist Antonio B De Castro the release marked a threshold. The hypermedia renaissance was no longer a rebellion. It was becoming an architectural default.

The 2.0 release brought three categories of improvement that signal the project's maturation.

First, a smaller bundle. When a library is lightweight, it is easier to justify adoption across a large codebase. You do not hesitate to include it on every page, and you are less likely to end up with inconsistent patterns where only certain sections of the app use enhanced behaviors. The practical effect is that teams can progressively enhance: start with a single endpoint powering an "inline edit" or "filter results" view, then expand without turning the rest of the templates into a legacy-free zone.

Second, a better extension system. Every team has a moment where "we'll just add one helper" becomes "we now maintain three parallel mini-frameworks for behavior." The improved extension system in 2.0 reduces that drift. Teams can standardize error rendering across requests, build reusable abstractions for common UI patterns like confirmation dialogs and optimistic spinners, and encapsulate analytics hooks so behavior is not scattered across templates.

Third, improved support for Server-Sent Events (SSE). This makes streaming UIs feel native real-time updates without the overhead of WebSockets or the complexity of polling.

De Castro, writing in October 2025, framed the release as a turning point. "With htmx 2.0, the hypermedia renaissance isn't a clever side project anymore; it's becoming a legitimate architectural default for internal tools and framework-driven teams."

The Stability Promise

Perhaps the most significant signal from the 2.0 release was philosophical: stability as a feature. The official roadmap states that the htmx team is "going to work to ensure that htmx is extremely stable in both API and implementation." Someone upgrading HTMX even from 1.x to 2.x should expect things to continue working as before.

The roadmap also introduces "no new features as a feature." The team is "going to be increasingly inclined to not accept new proposed features in the library core." People should not feel pressure to upgrade HTMX over time unless there are specific bugs they want fixed. The HTMX you write in 2025 should look very similar to the HTMX you write in 2035 and beyond.

This is a direct rebuke of the modern JavaScript framework cycle, where major versions arrive with breaking changes, migration guides stretch to dozens of pages, and teams spend sprint after sprint keeping up with the framework more than building the product.

The release schedule will be roughly quarterly going forward. "There will be no death march upgrades associated with htmx," the roadmap promises, "and there is no reason to monitor htmx releases for major functionality changes, just like with jQuery."

The AHA Stack and the Server-Side Renaissance

One of the most significant shifts in 2025 was the rise of what practitioners began calling the "AHA" Stack: Astro, HTMX, and Alpine.js. This combination allows full-stack developers to manage both UI and business logic in a single language whether that is Go, Python, or Ruby without surrendering to the complexity of a JavaScript-first architecture.

Astro handles the static parts of the page, serving HTML at build time. HTMX handles the interactive parts, swapping in server-rendered fragments on demand. Alpine.js handles the client-side logic that does not warrant a full HTMX request simple toggles, dropdowns, and the like. Together, they form a coherent architecture that keeps the server as the source of truth.

This is the server-side renaissance in practice. Teams are rediscovering that for the vast majority of web applications dashboards, admin panels, CRUD-heavy workflows the UI often looks complex but behaves like a set of forms, tables, filters, and modal interactions. Those interfaces do not require a full SPA framework to be excellent. They require responsiveness, correctness, and maintainability.

"This is especially attractive for internal applications dashboards, admin panels, CRUD-heavy workflows where the UI often looks complex but behaves like a set of forms, tables, filters, and modal interactions," De Castro notes. "Those interfaces don't require a full SPA framework to be excellent. They require responsiveness, correctness, and maintainability."

Real-World Deployments: From Curiosity to Critical Infrastructure

The trajectory from side project to production-ready tool is not hypothetical. The htmx essays page documents real-world deployments that illustrate the library's range.

One of the more striking examples is the network automation work done for the Paris 2024 Olympics. The essay "Building Critical Infrastructure with htmx: Network Automation for the Paris 2024 Olympics" describes how the library was used in systems where reliability and simplicity matter more than visual polish. This is not a marketing website or a side project it is infrastructure supporting a global event.

The essays page also documents ports from other frameworks: real-world examples of teams migrating from React to HTMX, from WebAssembly to HTMX, and from Next.js to HTMX. Each port is documented with the reasoning behind the decision and the outcomes observed. These are not success stories invented for a landing page they are technical post-mortems written by practitioners who made the switch.

There are also candid essays from developers who tried HTMX and moved on. The htmx team publishes these alongside the success stories a "Modest Critique of htmx" and "I tried HTMX, then ditched it" because the goal is not to convert everyone. The goal is to help developers make an informed decision about whether hypermedia-driven architecture fits their use case.

What This Means for TheWebSolvers Readers

If you have spent any time building or maintaining single-page applications, you have likely encountered the symptoms that HTMX addresses: the sprawling component tree that no one fully understands, the state synchronization bugs that appear only in production, the build times that grow longer with every dependency added, the cognitive overhead of keeping client and server models in sync.

HTMX does not eliminate complexity. It relocates it. The complexity of rendering HTML moves to the server, where it has always lived, where templating languages are mature and debugging tools are well-established. The complexity of client-side state management shrinks to the small interactions that genuinely belong in the browser.

For teams building internal tools, admin interfaces, or applications where the UI is form-driven, HTMX offers a path to faster development, smaller bundles, and better locality of behavior. For teams building highly interactive consumer applications, HTMX may not be the right choice but understanding the hypermedia approach helps clarify why SPAs have the tradeoffs they do.

The framework is not trying to be everything to everyone. The official documentation is explicit: "We are going to be increasingly inclined to not accept new proposed features in the library core." This is a feature, not a limitation. It means the HTMX you learn today will still work in five years, without migration guides or breaking changes.

Where to Read Further

The official HTMX essays collection is the definitive resource for understanding the philosophy behind the library. It includes deep dives on HATEOAS, REST, hypermedia controls, and the historical context of the web's original architecture. The essays are written by the library's creators and are notably candid about tradeoffs and limitations.

For a technical comparison of HTMX against SPA architectures, the analysis at ZenrioTech's examination of hypermedia-driven architecture provides a detailed look at the "double bookkeeping" problem and how HTMX addresses it.

The official roadmap document, published in January 2025, explains the team's philosophy around stability, backwards compatibility, and the aspiration to build "the 100 year web service." It is essential reading for anyone evaluating HTMX for a production application.

For practitioners who want to see real-world migration stories, the Antonio B De Castro analysis of htmx 2.0 documents the maturation of the hypermedia renaissance and provides context for why teams are making the switch.

The Paradox, Resolved

HTMX is called a paradox because it achieved something remarkable by doing something modest: it returned to the web's original model and made it practical for modern development. The paradox is that the "boring" choice the library that does not demand a conference talk or a viral blog post has become the catalyst for a renaissance.

But perhaps it is not a paradox at all. Perhaps it is simply that the web development community, after a decade of SPA orthodoxy, was ready for a reminder: the tools that stay online for a long time, that remain maintainable as teams change, that keep complexity manageable these are the tools that practitioners return to, again and again, even when newer options beckon.

HTMX is not trying to replace the web. It is trying to take the web seriously as it was designed: a hypermedia system, where HTML is the UI language and the server is the source of truth. In that sense, the hypermedia renaissance is not a revolution. It is a restoration.

HTMX Attribute Purpose Example
hx-get Issue GET request hx-get="/users"
hx-post Issue POST request hx-post="/users"
hx-put Issue PUT request hx-put="/users/1"
hx-delete Issue DELETE request hx-delete="/users/1"
hx-target Where to put the response hx-target="#results"
hx-swap How to swap the content hx-swap="outerHTML"
hx-trigger What triggers the request hx-trigger="click"
hx-indicator Loading indicator hx-indicator="#spinner"
hx-push-url Update browser URL hx-push-url="true"

Sources reviewed

Atlas Research Network