# htmx: 7.1 out of 10

A strong pick. 7th of 10 in [UI frameworks](https://elestia.ai/opensource/ui-frameworks/index.md).

htmx is a small, dependency-free library. HTML attributes fetch HTML from the server and swap it into the page, so the server renders the interface instead of a client-side framework. It is a strong, well-kept choice for server-rendered apps in any backend language, but a poor fit for UIs with a lot of client-side state, where React, Vue or Svelte do the job better.

**Best for:** Teams with a server-rendered backend (Django, Rails, Go, Laravel and others) who want interactive pages without building a single-page app.

## Scores

- **Overall: 7.1** (likely 6.0 to 8.0)
  - Claude Opus 5.5 (6.5): It is a strong pick for server-rendered apps that want interactivity without a JavaScript framework. It is small, safe, maintained, and htmx 4 is now stable. As a general UI framework it is narrower than React, Vue or Svelte, which do client-state-heavy apps clearly better. The range is wide because the score depends so much on the kind of app.
  - GPT-6.2 Sol (7.6): htmx is a strong pick when the server renders the interface and most interactions need fresh server data. React, Vue, and Svelte are stronger defaults for apps with substantial browser state, and Alpine.js is a closer fit for small interactions driven entirely in the browser. Active maintenance and real production use support the recommendation, while the young 4.x line and uneven adoption evidence keep the range wide.
- **Needed by many: 5.2** (likely 4.2 to 6.5)
  - Claude Opus 5.5 (5.0): htmx serves server-rendered web apps in any backend language. That is a large group, but it is narrower than all browser UI work. It does not serve single-page apps, rich client state or mobile hybrid work, which much of the category's audience needs. Many of its users are not mainly JavaScript developers, which makes the share hard to pin down.
  - GPT-6.2 Sol (5.3): htmx works with any backend that can return HTML, so it serves a sizable group building server-rendered forms, dashboards, stores, and content sites. Its fit narrows when the browser owns the application state or the backend only serves JSON. Survey results vary sharply by audience, so the share of JavaScript and TypeScript developers who would benefit is hard to pin down.
- **Helps a lot: 7.3** (likely 6.3 to 8.3)
  - Claude Opus 5.5 (6.5): For server-driven interactivity it is about the best tool there is. It is small, it has no dependencies, and htmx 4 adds fetch streaming, morphing and multi-target partial responses. It does not manage client state at all, though, and users report hard debugging and history problems. A peer framework does a better job for rich client UIs. The score shifts a lot with the kind of app.
  - GPT-6.2 Sol (8.1): Stable 4.0.2 handles requests, navigation, and targeted or multi-region HTML updates with little client code. The JavaScript API has TypeScript declarations, and the docs offer event logging and version-specific material for coding agents. Production reports describe more work for complex browser state, and performance depends on the server and network. Direct comparisons and independent evidence on agent accuracy with 4.x are limited.
- **Holds up over time: 7.2** (likely 6.1 to 8.2)
  - Claude Opus 5.5 (7.0): The project is active. It shipped 11 GitHub releases in the last year, htmx 4.0.2 came out days ago, and 2.x is promised indefinite support, with 4 kept on the npm next tag so nobody is upgraded by accident. Against that, the core team is small and led by its creator, funded by sponsors, with 126 commits a year. The htmx 4 default changes also need care when upgrading.
  - GPT-6.2 Sol (7.4): The project recorded 126 commits and 11 GitHub releases in the past year, has a named core team, and receives sponsorship. A reported Chrome regression was fixed in 16 days, and the team has kept 2.x as npm’s default during the 4.x transition. Breaking changes in 4.x add maintenance work, and the breadth of publishing access and long-term funding is unclear.
- **Used widely: 5.7** (likely 4.6 to 6.7)
  - Claude Opus 5.5 (5.5): npm downloads are 1.73M per 4 weeks, up 4.6x from a year ago, which is a bit above the 4.1 median. Most sites load htmx from a CDN, so npm undercounts real use, and its 348 dependent repos also understate it because backends in other languages do not show up there. The repository has 49.6k stars and strong Hacker News attention, but the State of JS 2025 shows flat or falling interest.
  - GPT-6.2 Sol (5.8): Four-week npm downloads rose from 379,035 to 1.73 million, or 4.57 times, modestly above the catalog baseline of 4.1 times. Indexed dependents trail every peer, including Alpine.js, but CDN and copied-file installs escape npm package tracking, and one public-web crawl detected htmx on roughly 60,000 sites. Django survey usage rose from 24% to 34%, while direct adoption across the wider category remains harder to estimate.
- **Vouched for: 6.5** (likely 5.2 to 7.5)
  - Claude Opus 5.5 (6.0): Independent coverage is current and wide: InfoQ, Hacker News threads above 800 points, and frameworks built on it such as Hyperflask and django-htmx. Production reports come mostly from small teams and blogs, not from big named companies. State of JS sentiment is mixed, and some teams report moving back to React.
  - GPT-6.2 Sol (6.9): FastHTML builds on htmx, and a Contexte engineer reported continued production use after migrating from React. In Stack Overflow’s 2026 survey, 55.9% of htmx users wanted to keep using it. The strongest production evidence concerns server-rendered apps, and the 4.x line has a short production track record.
- **Safe: 7.9** (likely 6.8 to 8.9)
  - Claude Opus 5.5 (8.0): It has zero dependencies, no known advisories, and the very permissive 0BSD licence. The OpenSSF Scorecard is only 5.2, with weak token permissions, unsigned releases, no SAST and partial code review. Because htmx swaps server HTML into the page, the app must escape its output to avoid XSS.
  - GPT-6.2 Sol (7.8): The core has zero runtime dependencies, a permissive 0BSD license, and no advisories in the collected OSV record. Version 4 defaults to same-origin requests, and applications still need to escape untrusted HTML before inserting it into the page. The 5.2 OpenSSF Scorecard flags workflow token permissions, dependency pinning, and release signing, and the number of npm publishers could not be verified.

## Good

- It has zero dependencies, ships as about 14 KB in one script, and needs no build step.
- It works with any backend language and template engine, so most of the code stays on the server.
- htmx 4 moved to fetch(), added built-in morphing swaps and hx-partial, and shipped an upgrade-check tool, while 2.x stays supported.
- The API is small and stable, and users report that AI coding assistants write correct htmx code.

## Bad

- It is weak for UIs with rich client state, such as drag-and-drop or offline use. Teams like Gumroad picked Next.js for this reason.
- htmx 4 changes defaults: inheritance becomes opt-in and events are renamed. This can break code silently, for example a CSRF header that stops being sent.
- Debugging swap and history problems can be hard, and error messages give little context.
- A small core team led by its creator does the work, and commit volume is low next to the big framework teams.

## The numbers

- Downloads, 4 weeks: 1.7M
- In a year: ×4.6
- GitHub stars: 50k
- Commits, 12 months: 126
- Last npm release: Sept 2026
- Advisories, 24 months: 0
- Licence: 0BSD
- GitHub: https://github.com/bigskysoftware/htmx
- npm: https://www.npmjs.com/package/htmx.org

Most sites load htmx from a CDN or a copied file, which npm does not count.

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
