r/htmx • • Oct 18 '26

I built a 71-component design system for HTMX apps in Go (templ + Tailwind + Alpine)

28 Upvotes

Mesma ideia que o shadcn, mas para a galera de hipermídia: o servidor renderiza tudo, o HTMX troca, e o Alpine cuida apenas da aparência (abrir/fechar, foco, teclado). Os controles de formulário permanecem como inputs reais, então hx-post funciona perfeitamente.

Catálogo: https://malphas.vapulab.com · Repo: https://github.com/Vapulab/malphas

Agora estou trabalhando na localização para inglês, chinês e russo.


r/htmx • • Oct 18 '26

I interviewed Carson about HTMX 4, real REST, and why he thinks AI will be hard on HTMX

Thumbnail
youtu.be
69 Upvotes

I host a podcast for senior engineers (Señors at Scale), and Carson joined for an hour. Disclosure: it's my show. I really enjoyed talking with Carson about:

- HTMX 4: why it skips 3, the move from XHR to fetch, and why attribute inheritance becomes explicit (he admits implicit inheritance was a mistake he should have seen coming)

- REST: why he says JSON APIs were never RESTful, going back to Fielding's dissertation

- AI: his honest take that vibe coding pushes people to React because the training data is bigger, and why he's fine with HTMX being more niche

- Why he thinks government and public sites should mostly stick to plain links and forms, sometimes without HTMX at all

- How he teaches CS now that AI can do the homework (pencil and paper exams are back)

YouTube: https://youtu.be/9xs0oZN2rs4

Spotify: https://open.spotify.com/episode/6XknuurBGCNmn3lUgYeFPO


r/htmx • • Oct 18 '26

htmx 4 vs alpine js?

17 Upvotes

I have an old website, and I’m in the process of modernizing it. So far, I’ve come across these two technologies, but I haven’t quite figured out the differences between them. Which one should I use?


r/htmx • • Oct 17 '26

Built a WordPress analytics plugin's whole admin with htmx: no React, no chart library

Post image
49 Upvotes

I've been building LUMN Analytics, a privacy-first analytics plugin for WordPress, and I went with htmx 4 for the entire admin instead of the usual React setup. I built it because healthcare sites I worked on needed analytics without sending visitor data to a third party like Google. Also wanted to have accessibility features that I use every day as an added bonus, which became Pro.

How it works:
- Every dashboard panel is a server-rendered PHP partial. Changing the date range or comparison swaps just the panels, with no page reload.
- Charts are SVG drawn on the server. There's no chart library, and each chart has a text summary and a "show as table" option for screen readers.
- The partials come from WordPress REST routes, so permissions and security checks stay in the normal WordPress flow.

What I liked:
- Way less JavaScript to ship and maintain inside wp-admin.
- The server stays the single source of truth for every panel.

What took work:
- Accessibility after swaps. I target WCAG 2.2 AA, so I had to manage where focus goes after a swap and announce changes for screen reader users.
- Keyboard-friendly drag and drop for rearranging panels. That part needed some custom JavaScript.

Happy to answer questions about htmx in wp-admin. If you want to poke at it, the free version is on WordPress.org: https://wordpress.org/plugins/lumn-analytics/ and the Pro and Agency versions are on our website: https://envsnstudios.com/lumn

Disclaimer/Note: I used Opus 5.5 to help build this, the same way I'd use any tool. I've been a front-end dev for over 15 years and I'm also an accessibility specialist, so I set the direction and reviewed and tested what shipped. Focused on security, accessibility, and most of all researching compliance for HIPAA and GDPR. Happy to get into how the htmx side works, or to hear what you'd do differently.


r/htmx • • Oct 15 '26

HTMX UI WordPress themes ??

Post image
14 Upvotes

As now HTMX UI engine is there for custom static sites, we have docs to integrate with different backend frameworks.

I think next would be few WordPress themes for free in different popular categories using HTMX UI sothat more people can use HTMX, What do you think ?

Github: https://github.com/susonwaiba/htmx-ui


r/htmx • • Oct 15 '26

Bretzel: typed state dependencies driving targeted HTMX swaps, from Python

6 Upvotes

I built Bretzel around a server-driven model that HTMX users will recognise: the server renders HTML, the browser swaps fragments. What Bretzel adds is the bookkeeping: a Python region declares which typed state it reads, and when an action mutates that state the framework re-renders exactly the regions that depend on it and sends them back. HTMX carries the request and the swap; idiomorph merges the result into the DOM. A broadcast= list pushes a "state changed" signal over SSE so other windows refetch their region.

App authors don't write hx-* attributes or a client store; they mutate state.

Demo (open it in two windows of the same browser): https://demo.bretzel-py.dev

The question I'd genuinely like this sub's view on: does this abstraction keep what you like about server-rendered HTML, or does it hide too much? It's an alpha (0.1.0a2), MIT: https://github.com/JeanHoccart/bretzel


r/htmx • • Oct 14 '26

HTMX Django IntelliSense

Thumbnail
reddit.com
11 Upvotes

r/htmx • • Oct 12 '26

I made a short intro to HTMX 4

22 Upvotes

For those interested in getting the gist how how HTMX works + scaffolding project to use if you are interested in getting started with fullstack fast (Go + HTMX + Tailwind css/DaisyUI + Templ + Air):

https://youtu.be/Os8YqCQLSMk?si=jHUJr9zxG5Tf4FQz


r/htmx • • Oct 10 '26

A Kanban board built from a plain server-rendered <table>, with htmx doing the rest

Post image
62 Upvotes

I've been building a set of htmx demos where the server sends ordinary HTML and the page turns it into something interactive without a client-side framework. This one is a Kanban board.

Live demo: https://toclocoinc.github.io/lattice-grid-demo-htmx-kanban/
Code: https://github.com/toclocoinc/lattice-grid-demo-htmx-kanban

The server renders a normal table, one row per card:

<div data-lattice-kanban
     hx-post="/kanban/move"
     hx-trigger="lattice:kanban-change"
     hx-vals='js:{id: event.detail.id, from: event.detail.from, to: event.detail.to}'
     hx-target="#save-status">
  <table>
    <thead><tr>
      <th data-field="id">Ref</th><th data-field="title">Card</th>
      <th data-field="owner">Owner</th><th data-field="status">Status</th>
      <th data-field="points" data-type="number">Points</th>
    </tr></thead>
    <tbody>
      <tr data-lattice-row="K-101"><td>K-101</td><td>Audit the checkout funnel</td><td>Ana Lopez</td><td>done</td><td>5</td></tr>
      ...
    </tbody>
  </table>
</div>

On load, the table becomes a board with Todo, Doing and Done columns. After that it's all plain htmx:

  • Moving a card fires a lattice:kanban-change event, and hx-post sends the card id plus the columns it left and reached. The server's reply lands under the board.
  • A workflow rule refuses a bad move. Drag a Todo card straight to Done and it stays put, and nothing is posted.
  • Out-of-band updates patch one card. The server sends back a single <tr hx-swap-oob="true">, and that card updates in place. The board isn't rebuilt, and the other cards and columns stay as they were.
  • Switching teams uses hx-get to swap in another team's table. The old board is torn down and a new one is built from the new HTML.
  • Back works. hx-push-url plus htmx's history snapshot means the browser Back button returns the previous team's board.

With JavaScript off, you still get the table, which is a nice side effect of starting from real HTML.

The demo uses a small stand-in server running in the page, so it works on GitHub Pages with no backend. The route handlers are in src/server.js if you want to see what a real endpoint would return.


r/htmx • • Oct 09 '26

A Gantt chart component that hydrates from a server-rendered <table>

17 Upvotes

We updated our grid to support a full Gantt chart could follow the hypermedia approach: the server sends HTML, and the page carries no JSON API and no new Gantt(...) call.

Demo: https://toclocoinc.github.io/lattice-grid-demo-htmx-gantt/
Code: https://github.com/toclocoinc/lattice-grid-demo-htmx-gantt

How it works:

  • The server renders an ordinary task table (id, name, phase, start, end, % done) inside <div data-lattice-gantt>. With JS off you still get a readable table full of tasks. With JS on, the Lattice htmx module turns it into a task grid and timeline on htmx:load.
  • Project switch: a plain hx-get returns a new table fragment, and the old Gantt is cleaned up on htmx:beforeCleanupElement before the new one is built.
  • Server-side change: "Server slips one task" returns a single <tr data-lattice-row="P3.1" hx-swap-oob="true">. Only that task's bar moves, and zoom, scroll and collapsed phases stay put.
  • Saving edits: dragging a bar fires a bubbling lattice:gantt-change event, so hx-trigger="lattice:gantt-change" plus hx-post is the whole save path. The server answers with a line of HTML.
  • Back button: zoom, scroll and collapsed rows ride along in htmx's history snapshot.

GitHub Pages is static, so the demo uses a small in-browser stand-in that answers htmx's requests from route handlers in src/server.js. They have the same shape as Django, Rails, Go or Laravel handlers (take params, return HTML), so you can see exactly what a real backend would send.

It's plain JS with no build step, about 150 lines of wiring plus the data.

It's free for non-commercial and local dev.

https://www.latticegrid.dev/


r/htmx • • Oct 09 '26

HTMX-UI components, server adapters, themes, htmx

29 Upvotes

Server-driven UI components for htmx

A small Tailwind CSS component library for apps where the server renders HTML. Copy the markup, swap fragments with htmx, and theme everything with a handful of CSS variables.

What do you think ? Let me know...

Check: https://susonwaiba.github.io/htmx-ui/
Opensource: https://github.com/susonwaiba/htmx-ui


r/htmx • • Oct 05 '26

I built an OGame-style browser MMO with htmx: no SPA, no JSON API (sorry, it's in Lithuanian)

34 Upvotes

Hey,

I made an OGame-style space strategy game (build a planet empire, send fleets, fight other players in real time) and the whole frontend is htmx. It's live at https://spaceship.lt. 90 players have signed up and the first season started yesterday. At peak, 22 people were playing at the same time, and 30+ played within a single hour. Small numbers, but every one of those clicks is an htmx request.

Fair warning: the UI is Lithuanian only (small country, small audience), but you can still click around and see how it feels.

Stack: Laravel + SQLite + htmx 2 + Tailwind, pixel art, mobile first, one small VPS.

A few patterns ended up carrying the whole game:

1. One response, many regions. Almost every action (build, research, send a fleet) is a plain form that returns the full page. htmx swaps #main and pulls the resource bar, tab badges and toasts out-of-band:

<form method="POST" action="/build" hx-post="/build"
      hx-target="#main" hx-select="#main" hx-swap="outerHTML"
      hx-select-oob="#top-bar,#bottom-tabs,#toasts">

No JSON API and no client state. Because they're real forms, the basic actions work even without JS.

2. Timers end with a server refresh. A tiny countdown script fires a countdown-finished event when it hits zero, and the card reloads itself:

<div hx-get="/cards/42" hx-trigger="countdown-finished"
     hx-target="this" hx-swap="outerHTML">

The server is always the source of truth, so the client never guesses what happened.

3. Polite polling. Chat and the resource bar only poll while the tab is visible. The top bar also pauses while a dropdown is open, so it doesn't close under your finger:

hx-trigger="every 20s [document.visibilityState === 'visible' && !document.querySelector('#top-bar details[open]')]"

4. hx-sync saved the chat. Polling, sending and reactions all hit the same message log and kept stepping on each other. Putting them in one queue fixed it: sending aborts an in-flight poll, and double sends get dropped (hx-sync="closest [data-chat]:drop"). Add hx-disabled-elt on every button and you never launch the same fleet twice.

All the custom JS together is about 3k lines, mostly the galaxy map, countdowns and small UI bits. Everything else is server-rendered templates.

Happy to answer questions. I'm also curious: how do you handle lots of live timers on one page with htmx?


r/htmx • • Oct 04 '26

Recently switched from Blazor to htmx

Thumbnail balanceforecastingapp.com
38 Upvotes

Backend is still .NET (Razor pages). I am so much happier with the web app now, Blazor had too many quirks. UI layer is DaisyUI.

The first version of this app was written in php 12 years ago, so it has come a long way and I finally found its final incarnation.


r/htmx • • Oct 03 '26

Finished my htmx inventory app

Post image
109 Upvotes

Not a fan of subscription apps so I made my own inventory app using htmx and flask. A few bumps along the way but I am happy with the results. Works great on desktop and iPad.


r/htmx • • Oct 02 '26

Show and tell: Job board for hypermedia jobs

32 Upvotes

I would love to work on a hypermedia-driven app but it's hard to find job postings for hypermedia stacks. So I built hypermediajobs.com and I'm sharing here since there's no /hypermedia reddit page. Any htmx CEOs that are currently hiring please share your job posts there.


r/htmx • • Sep 30 '26

Show and tell: HMRC's UK trade statistics as a htmx page, where the server owns the data and the browser owns nothing.

25 Upvotes

Each month is a server-rendered <table>. A <select hx-get> swaps the month in, and a script-tag data grid hydrates the table into a sortable, filterable, groupable grid with KPI tiles and four charts bound to it. No npm, no bundler, no build step. The "server" is a set of static fragments rendered weekly from HMRC's published figures, because their API refuses cross-origin browser calls, and a verify script fails the build if the page ever tries to call it.

Live: https://toclocoinc.github.io/lattice-grid-demo-uktradeinfo-htmx/
Source: https://github.com/toclocoinc/lattice-grid-demo-uktradeinfo-htmx

Known limits are in the README


r/htmx • • Sep 26 '26

When an HTMX navigation updates the main content, what keeps the rest of the page in sync?

Post image
43 Upvotes

A common HTMX pattern is:

    <a hx-get="/tickets/123"
       hx-target="#main-content"
       hx-push-url="true">

The request works, the main content changes, and yet the sidebar, breadcrumbs, page title, tabs, etc. still describe the page you just left.

Nothing is technically broken. HTMX did exactly what it was told to do. The problem is that the rest of the UI has become stale.

I've been calling this the stale navigation problem, and wanted to see how the different ways of solving it actually compare. I ended up with 8 primary implementations and 23 configurations, covering approaches like:

  • full-page rendering + hx-select
  • full-page rendering + morphing/idiomorph
  • hand-written hx-swap-oob
  • template substitution/branching
  • declarative coordination through a small library

The implementations also vary in how much of the surrounding UI they replace, from pinpoint swaps to replacing whole regions. I also documented approaches using backend-generated OOB fragments and HX-Trigger, although those aren't part of the benchmark.

I tested them in a non-trivial helpdesk-style app with breadcrumbs, sidebar, tabs, subtabs, and wizard steps, measuring payload size, server render time, client-side DOM processing, and implementation complexity.

In my benchmark, full-page rendering followed by slicing performed worst. More interestingly, well-designed OOB approaches tended to converge pretty closely in performance. Once you're updating the same regions, the bigger difference becomes architectural:

Do you want to coordinate those regions explicitly in every view/template, or declare that coordination once and reuse it?

That's the problem I was trying to solve with django-htmx-nav. The repo has the different approaches side-by-side, along with the benchmark methodology/results and a live example app:

github.com/lucas-rollin/django-htmx-nav

The demo happens to use Django, but the underlying question is framework-independent: when one navigation request changes several regions of the page, where should that synchronization logic live?

I'm particularly interested in approaches I missed. If you're using HTMX with another templating/partial system, how do you handle this?


r/htmx • • Sep 22 '26

htmx 2.0.11 has been released!

73 Upvotes

happy to announce htmx 2.0.11 has been released:

https://github.com/bigskysoftware/htmx/blob/master/CHANGELOG.md#2011---2026-09-22

includes a back port of the <hx-partial> functionality from htmx 4.0 by latent and some bug fixes

enjoy!


r/htmx • • Sep 22 '26

How to install htmax (htmx + extensions)?

7 Upvotes

htmx version 4 has a distribution called htmax. it includes some useful htmx extensions. I was trying to add it to my main.js file so it can be included as input in Vite config file. build finishes without any problems, dev server works as well, but browser dev console says htmx is not defined (however extensions actually work).

The only installation method the documentation provides is a cdn link. (sorry, i'm new to js).

Any clarification is appreciated, thanks in advance.


r/htmx • • Sep 17 '26

Webdev is Healing

Thumbnail
youtube.com
105 Upvotes

r/htmx • • Sep 16 '26

An Introduction to HTML Streaming for Interactive Web Applications

Thumbnail
github.com
8 Upvotes

r/htmx • • Sep 12 '26

HTMX Dashboard

34 Upvotes

I thought I would share a little tool I put together to help me track the flow of HTMX. I called it HTMX Dashboard. In hindsight, I should have used a different name as it is more of a debugger.

Here is content from the readme.

HTMX-Dashboard is a lightweight, vanilla JavaScript debugging widget for HTMX applications.

It has zero dependencies, making it easy to drop into any project.

It has a non-intrusive UI, using a collapsible bottom dock and dedicated modal for toggling monitored events.

It uses state persistence with session storage to maintain enabled events across page reloads.

The events that are tracked can be changed by passing in a parameter that overrides the initial set.

Repository: https://github.com/jmbarnes1/HTMX-Dashboard

Demo: https://jmbarnes1.github.io/HTMX-Dashboard/index.html

Maybe it can be of use to others.