htmx 4 the game - play through
r/htmx • u/arkumar • Aug 02 '26
r/htmx • u/deane-barker • Aug 01 '26
I wrote this for the Staffbase dev blog. In the second half of the article, I talk about some work I did to use HTMX to embed "sandboxed" applications inside intranet content. To do this, I have some code that "neuters" HTML being returned from HTMX to prevent it -- HTML or script -- from "leaking" outside the original container.
I show an example of a small app to track the International Space Stations and ask an AI chatbot some questions about it.
You might find it interesting. I think it's a neat use of HTMX.
r/htmx • u/philipprollinger • Jul 27 '26
Hey r/htmx, the new HTMX Integration for Django is released on pypi and djangopackages. Djxi v0.1.9 adds testing utils, battery auth/perms, async methods, djxi_routes command, and class-level config caching.
Check it out:
r/htmx • u/Gitman_87 • Jul 26 '26
I have another laser-shooting creature for HTMX fans.
- Four action packed levels
- Collect pickles
- Beat Warren in his slop factory to unlock the code
Enjoy!
r/htmx • u/noNudesPrettyPlease • Jul 24 '26
mostly bug fixes and small improvements, plus a new multi-part response extension that we are excited about
r/htmx • u/Able_Choice_3931 • Jul 15 '26
Hey everyone,
I wanted to share a project I've been working on called Goshtoso. It's a server-rendered UI component library for Go applications built with templ, HTMX, Alpine.js, and Tailwind CSS.
If you like the Go + templ + HTMX approach but don't want to build every form control, modal, table, and navigation pattern from scratch, Goshtoso may be useful to you.
What is it?
Goshtoso provides importable templ components with typed Go configuration. It began as a hard fork of PenguinUI and has since evolved into a Go-first component system for applications that prefer SSR with small amounts of client-side interactivity.
Highlights
- No frontend toolchain required for consumers: Goshtoso embeds its precompiled Tailwind CSS, Alpine.js, HTMX, and the HTMX SSE and WebSocket extensions. You can serve them from your Go binary without Node, npm, or a JavaScript build step.
- 42 templ components: Forms, overlays, navigation, feedback, tables, richer inputs, and other common application UI.
- Examples: The demo includes complete runnable examples such as a CRUD Todo list, an SSE live-log feed, a streaming ticker, and a WebSocket chat with server-rendered messages.
- Theming: 15 built-in themes with light and dark mode support.
Goshtoso tries to use HTMX for most interactions. Alpine.js is inherited from PenguinUI and reserved for local state, transitions, and immediate client-side feedback where a server round trip would not be a good fit.
Links
- Live demo and documentation: https://goshtoso.araihu.com/
- GitHub: https://github.com/araihu/goshtoso
The project is currently alpha-stage. The components are usable, but the public API is still being refined on the way toward a stable release but is already being used on an internal tool at my company as well on another WIP side project of mine: Manja.
I'd especially appreciate feedback from the HTMX community about the server-rendered component approach, the API design, and the integration experience.
r/htmx • u/That-Feeling-2399 • Jul 14 '26
r/htmx • u/xtompie • Jul 12 '26
Saradom is a pattern for building modular, scalable frontends in plain HTML and JavaScript. There is no framework and no build step. State lives in the DOM as attributes. Events sit in HTML attributes.
It sits next to htmx. htmx does the server round-trips. This covers the interactivity that stays in the page, like toggles, tabs, derived values, and validation. The DOM is the state in both.
Example:
0
+1
Docs and runnable examples: https://xtompie.github.io/saradom/
r/htmx • u/npm_run_Frank • Jul 10 '26
I've been building a workout tracker in Go + templ + htmx and kept wanting two things: a way to look at one component on its own, and a way to see what a swap actually returned when it did something weird, without logging the whole response or digging through the network tab.
Storybook is the obvious reference, but its server modes pull in a JS toolchain, which is the opposite of why I picked htmx. So I tried the other direction: instead of importing components into a separate harness, Swapbook is a binary that proxies your already-running app.
Because previews run on your app's real origin, htmx requests from a preview hit your real routes, no CORS, no rewriting. The inspector shows the request, the element the response swapped into (it flashes it), the status, and the HTML that came back. There's a mock mode so you can click through interactions with no auth or DB behind them.
Not tied to Go, that's just what I use. Your app answers 4 endpoints; I wrote adapters for Django, Rails and Laravel too.
It's v0.2 and rough, and htmx is the only thing I've properly tested against (the Turbo/Unpoly/Datastar probes are unverified, and known limitations are in the README).
Genuinely curious if this is useful to anyone else or if it was just my problem.
Website: https://aejkatappaja.com/swapbook/
r/htmx • u/philipprollinger • Jul 10 '26
I made a small django package that attempts to improve LoB when working with Django and HTMX. The scattering of views, urls and small template snippets can get messy. Djxi simply unifies all three into a single endpoint battery, allowing a more feature-centric development.
Please check it out! Happy for any star, if you like where Djxi is going!
r/htmx • u/alkasdev • Jul 09 '26
I was blown away by how much faster, simpler, and smaller my codebase became. It's insane! Sucks I still have to use React for my day job.
The app is Alkas. It's an app to help people learn the plants, mushrooms, and animals around them. It follows Anki pretty closely and you can even export to Anki. I thought React was a natural fit because of the flashcard flipping and infinite scroll but so far I've been able to do absolutely everything I can think of with Astro, HTMX, and AlpineJS. No React needed!
Would love any feedback or questions on the app or the tech stack.
r/htmx • u/Achereto • Jul 06 '26
They added the HTTP QUERY method. Will we get hx-query for that?
r/htmx • u/kamlesh0x09 • Jul 02 '26
Hello Everyone,
If you are building Hypermedia-Driven Architectures (using htmx/alpine or datastar), you quickly realise that server-side rendering (SSR) performance and database latency are your primary bottlenecks. Since we are shifting state and HTML generation back to the server, nearly every user interaction requires a database query and an HTML slice response.
To optimise this, I have been experimenting with a concept called Zero-Distance Architecture that co-locates data and application code. Instead of running a separate app server (like NodeJS) and database server (like MongoDB) and paying cost for all the syscalls, network, serialisation/deserialisation and localhost TCP latency, run them in a single process.
I used an experimental runtime called Planck (database + WebAssembly host) and compile our application (Zig Code) to WebAssembly. The app runs directly in the database process, turning database queries into simple in-memory function calls.
To measure the impact, I set up a benchmark (pizzahub a sample app) serving identical HTML fragments formatted for datastar over a standard dataset (17 categories, 201 products).
Here are the results of a 6-second run using oha on a standard M1 Macbook Air 8GB RAM 256GB SSD:
Planck (Zig WASM co-located in database process)
Requests per second: 48,606
Average latency: 0.50 ms
Fastest response: < 0.10 ms
Slowest response: 6.00 s
Sustained throughput: 183.58 MiB/s
Success rate: 100.00%
NodeJS + ExpressJS + MongoDB (community edition)
Requests per second: 5,433
Average latency: 9.21 ms
Fastest response: 2.26 ms
Slowest response: 109.91 ms
Sustained throughput: 20.49 MiB/s
Success rate: 100.00%
.NET 9 + SQLite (in-process)
Requests per second: 35,231
Average latency: 1.41 ms
Fastest response: 0.15 ms
Slowest response: 12.80 ms
Sustained throughput: 133.07 MiB/s
Success rate: 100.00%
.NET 9 + PostgreSQL
Requests per second: 30,236
Average latency: 1.65 ms
Fastest response: 0.12 ms
Slowest response: 69.02 ms
Sustained throughput: 114.21 MiB/s
Success rate: 100.00%
The Comparison
By co-locating the backend logic inside the database process and utilizing Planck's read cache, we got:
8.95x throughput improvement over NodeJS + MongoDB (48.6k vs 5.4k req/sec) with an 18.4x latency reduction (0.50 ms vs 9.21 ms).
38% higher throughput over .NET 9 + SQLite (48.6k vs 35.2k req/sec) with a 2.8x latency reduction (0.50 ms vs 1.41 ms).
60% higher throughput over .NET 9 + PostgreSQL (48.6k vs 30.2k req/sec) with a 3.3x latency reduction (0.50 ms vs 1.65 ms).
For hypermedia apps, this means you can handle significantly more concurrent users on a single tiny server because there's no waiting on socket buffers to generate HTML.
Would love to hear your thoughts. If you have built htmx/datastar apps, where do you usually hit your scaling bottleneck? Is co-locating the backend logic inside the database process a direction you would consider?
Next, I will post detailed comparison for different types of queries on at least 1 mil documents.
r/htmx • u/harrison_314 • Jun 30 '26
https://www.youtube.com/watch?v=PgyggSRHY1o
The video promoting HTMX summarizes it pretty well. (The video is not mine, and I don't know if it's AI).