Enjoying this issue?
Get tomorrow's AI & engineering digest in your inbox — hand-picked, summarized, and always spam-free.
TLDR
Datastar, an 11KB library, combines HTMX and Alpine.js functionality into a single package, but its size advantage over HTMX 4 is now minimal (457 bytes). Its key differentiators are reactive signals with per-variable tracking, SSE streaming, and server-side state management, versus HTMX's locality of behavior and larger ecosystem. HTMX wins for most users, while Datastar suits server-pushed live interfaces like dashboards and multiplayer apps.
Key points
- Datastar is smaller than HTMX plus Alpine and Idiomorph (64% reduction), but size advantage over HTMX 4 is negligible (457 bytes).
- Datastar uses signals with per-variable tracking, while HTMX 4's HX-live re-evaluates all bindings on any DOM mutation.
- Datastar relies on server-side state via JSON merge patch (RFC 7396) and SSE streaming, opposing HTMX's client-side locality of behavior.
- Datastar Pro costs $349 solo/$1,299 team for animations, local storage, clipboard access; core remains free.
- HTMX has 48,900 stars vs Datastar's 4,800, and Drupal core has an open issue to adopt HTMX 4.
- Datastar 1.0 shipped April 2025; HTMX 4 remains in beta 6 with GA expected early to mid-2026.
- Datastar was created by Delaney Gillilan after his proposal to rewrite HTMX in TypeScript was rejected.
Tools mentioned
Techniques
- Reactive signals with per-variable tracking
- JSON merge patch (RFC 7396)
- Server-sent events (SSE) streaming
- Locality of behavior
- Server-side state management
Stop scrolling. Start reading smarter.
Receive the day's most important AI & engineering updates in one concise email. No spam.
Transcript (captions)
Open htmx.org. Not a fan site, not a rival's blog, the official htmx site, the alternatives page. It lists 11 libraries that do roughly what htmx does. 10 get a polite paragraph, one gets this. Data Star combines functionality found in both htmx and alpine.js into a single tidy package that is smaller than htmx.
That is htmx on its own domain telling you that a rival is smaller than it and does more than it does. So, pull both bundles off the CDN and compress them. Data Star 1.02, 11.76 kibibytes. That is broadly the best case. On gzip, it is 12.96.
So, the 11 in the title is already generous. htmx 4.0 beta 6, same compression, 11.31. The challenger is bigger by 457 bytes. The size argument in this video's title expired last month. 457 bytes is about one long paragraph of plain text.
That is the entire advantage. So, if the kilobytes are a tie, what is actually left to choose between? That is the decision in front of every htmx app this year because Data Star was not built to be a smaller htmx. It came from someone who tried to change htmx first. He read the source.
He ported all of it to TypeScript. He took a proposal to htmx's creator. He was told no. Everything in that proposal, fetch, streaming, morphing, reactive expressions, is on htmx 4's headline feature list. This is the story of a rejected rewrite that became a rival and whether the rival still has a reason to exist.
Start in August 2023. A developer named Delaney Gillilan pushes the first commit to a repo called Data Star. He is not a front-end person. He built video games, slot machines, and military applications. Screens where a stale pixel is a real problem and the server does not stop talking.
He had already tried the polite route. He read the whole htmx code base, read Alpine's, and took a pitch to Carson Gross, htmx's is Rewrite it in TypeScript. Then he went and did it. The port compiled with roughly 700 type errors. He ground that down to about 300 and stopped.
He stopped because the errors were not the interesting part. The shape underneath could not do the thing he wanted it to do. So he started a fork and gave it the least subtle name in open source history. He called it not HTMX 2. Carson said no.
That is the entire fight. No lawsuit, no drama thread. One maintainer decided his library's internals were staying as they were. One contributor decided he cared enough to go and build the other version. And here is the part that turns a comparison table into a story.
The things Delaney wanted in HTMX, fetch instead of XHR, streaming, morphing built in, reactive expressions and attributes, are item for item the headline features of HTMX 4. It's own announcement from the 1st of November 2025. The biggest internal change is that fetch will replace XOnline Russian as the core Ajax infrastructure. Nobody has claimed HTMX 4 exists because of Data Star and this video will not either. But the sequence is dated, public, and sitting in two repositories.
Proposed, refused, forked, and shipped anyway. Which sets up the only question that matters. If HTMX 4 ships all of it, what is left? Three things and only one is size. So start there because it is the one most people get wrong.
The comparison page from Data Star's own author is brutal. HTMX plus Idiomorph plus Alpine, 305 kilobytes of source, 57 Brotli. Data Star, 39, 10.2 Brotli. 82% smaller. That number is real and it is also framed.
It compresses the unminified HTMX source against the minified Data Star bundle and unminified HTMX is not what a browser downloads. So redo it fairly. Every file minified, every file Brotli at the same setting. HTMX 2.0.10, 14.64 kibibytes. Idiomorph, 2.87.
Alpine 315, 14.77. 32.28 for the stack against Data Star's 11.76. The real figure is 64%, not 82. 2.75 times smaller, not five and a half. 64% is still an enormous win, and it deserves a steel man.
One library instead of three. One mental model instead of three. One version matrix instead of three. The inflated number bought nothing. It was not even the strong argument.
Because run the same measurement against HTMX 4 and Data Star loses. 11.76 against 11.31. That is the trap in every framework comparison you will read this year. A spec sheet is a snapshot, and snapshots expire. Size is the argument you reach for before you have found the real one.
So, here is the real one. Both libraries now let you write reactive expressions straight into HTML attributes, and they do it in ways that are not close to the same thing. HTMX 4's version is called HX live, and the first fact about it is where it lives, the extensions page, not core. You opt into it on top of the library the way you used to opt into Idiomorph, and its own documentation states the cost without flinching. Expressions run on any DOM mutation.
There is no per variable tracking. Sit with that for a second as an engineer. Every binding on the page re-evaluates every time anything in the DOM changes. The docs ship a guardrail rather than a fix. If recomputes exceed 50 per second, the extension logs a warning and keeps running.
There is one more line in those docs, and it is the sharpest sentence in the HTMX 4 documentation. If Alpine is detected on the page, HX live switches off its own shorthand syntax because both libraries claim the colon. Two reactivity systems, one character fighting over it. Data Star does not have that argument because it does not have two libraries. Signals live in the core bundle.
They track per variable, and they are the same signals the server writes into. Your back end sends a JSON merge patch RFC 7396, a real standard, and only the bindings touching a changed value update. Which is why the server sent events objection stopped being an objection. Version one dropped the requirement. Data star takes an ordinary JSON or HTML response now and streams over SSE only when you actually want a stream, which was the most common reason developers bounced off it.
So, the framing is not small versus large. HTMX puts behavior next to the element it affects, locality of behavior, its whole philosophy, and the reason people love it. Data star puts the state on the server and lets the server patch the page. Those are opposite bets about where an application lives. So, before the price comes up, answer this one for yourself.
Would you hand your application state to your back-end and give up locality of behavior to run one library instead of three? Hold your answer because the next fact changes the arithmetic. Data star is not entirely free. 10 attributes and three actions sit behind Data Star Pro. $349 for a solo developer, $1,299 for a team of up to 25 people, lifetime license, one payment.
What is behind the wall? Animation, local storage persistence, query string syncing, scroll into view, clipboard access, convenience, not capability, and the project says so itself. The core stays free, small, and fast. Pro is convenience and tooling, not basic capabilities. When that list surfaced on Hacker News in October 2025, it went the way you would expect.
306 points, 287 comments, and a lot of developers annoyed that no price appeared anywhere on the homepage. The defense holds up better than the outrage did. Star Federation is a registered non-profit. The license is one-time and lifetime, no buyout, and no rug pull, in the maintainer's words. And anything Pro does, you can build yourself the same as anyone else.
The part that gets left out is that the price has moved. In October, it was 299 solo, 999 for a team. Today, 349 and 1299, 17% and 30% in 10 months. Not a scandal, information. Watch what a project charges, not what it announces.
Now, the axis that is already decided. HTMX, 48,900 stars, 458 contributors, 6 years in the field. Data Star, 4,800 stars, 75 contributors. 10 times the audience, six times the contributors. And Drupal core, the CMS that 480,000 sites report running, has an open issue to move to HTMX 4, tagged as a blocker for Drupal 12, still in review as of late July.
That is institutional weight, and Data Star has no equivalent to it. Its examples page lists more than 40 demos and zero named customers, but flip the board. Data Star shipped 1.0 on the 16th of April this year, and the release note is one of the best in software. Data Star 1.0 has finally shipped. We are done.
Done like dinner. HTMX 4, as of today, is on beta 6. Its own announcement 9 months ago said full release early to mid-2026. On NPM, the latest tag still points at 2.0.10. In June, Carson Gross told a Drupal thread, "At this point, every release candidate is a candidate for GM." So, the verdict, and it is not the one the title sets you up for, Data Star wins for a smaller and more specific group than the hype suggests.
If your product is a server pushing state into a live interface, dashboards, collaborative editing, anything multiplayer, Data Star is not the lighter choice. It is the finished one. For the rest of you, and that is most of you, HTMX wins, and HTMX 4 widens the gap. It is smaller than Data Star now. It is free, and HTMX 2 is supported in perpetuity by an author who wrote that promise down in public.
The villain was not HTMX, and it was not Data Star. It was the kilobyte itself, a spec sheet argument used by both camps doing work that architecture should be doing. So, a bet with a date on it. HTMX 4 goes generally available before the 31st of March 2027, and DataStar is still under 10,000 stars when it lands, which leaves the one question this cannot answer for you. When the entire size advantage comes down to 457 bytes, what were you really choosing?
The library or the argument it arrived with?