Show HN: I made a HTMX Playground 100% in the browser

An in-browser HTMX playground has prompted web developers to share how they use HTMX with frameworks like Django and Rust to build interactive, server-driven UIs without heavy JavaScript frontends. Commenters debate how far this hypermedia-centric approach can scale, how it compares to SPAs, LiveView, and tools like Unpoly, and where it breaks down (e.g., offline-first apps or GraphQL-only backends). The creator of HTMX weighs in on design philosophy, appropriate use cases, and reassures skeptics that the library is easy to learn and can coexist with traditional JavaScript when needed.

HTMX concept & comparisons

  • HTMX is framed as generalizing HTML hypermedia controls: any element can trigger HTTP requests and transclude returned HTML into the DOM.
  • Several compare it to DHTML, Turbolinks/Hotwire, Phoenix LiveView, and Unpoly:
    • DHTML was JS-heavy and pre-XHR; HTMX is hypermedia-focused.
    • Turbolinks/Hotwire and Unpoly are seen as higher-level, more “magic,” while HTMX is lower-level and less opaque.
    • LiveView and HTMX address similar problems but in different stacks.
  • HTMX is considered a poor fit when the backend is a pure JSON/GraphQL API rather than returning hypermedia.

Use cases & integration experiences

  • Multiple reports of successful use with Django, SQLAlchemy, Rust, Go, and Node; often replacing JS-heavy SPA setups.
  • Pattern: use HTMX for 90–99% of UI and drop in small amounts of custom JS/Vue/Alpine for highly interactive pieces.
  • People praise the simplicity of adopting HTMX, especially for backend-leaning developers.

Progressive enhancement & partial updates

  • Discussion on enhancing traditional form submissions so the same endpoint returns a full page for non-JS users but HTMX only swaps specific fragments.
  • Techniques mentioned: hx-target, hx-select, hx-boost, and the multi-swap extension to update only parts of the response.
  • Unpoly is cited as another tool that excels at this pattern.

Offline, SPA-like, and mobile behavior

  • Several explore or advocate HTMX-like architectures for offline-first apps:
    • Service worker “virtual servers” or local companion backends.
    • Some claim they’ve built elegant offline-first apps this way; others call this over-engineered and contrary to HTMX’s spirit.
  • There is debate on using hypermedia/HATEOAS beyond the web (desktop/mobile), with mixed views on its real-world UX benefits.

Team adoption, hiring, and complexity

  • Concern: smaller HTMX talent pool versus mainstream JS frameworks.
  • Counterarguments:
    • HTMX is quick to learn if you know HTML/JS.
    • It encourages full-stack ownership and backend-centric structure.
    • Spaghetti code is a risk in any paradigm; SPAs don’t inherently prevent it.
  • HTMX is reported as rising in popularity, but considered just one tool, not a universal solution.

Playground-specific feedback

  • Overall reception of the HTMX playground is very positive.
  • Suggestions: better mobile support, improved error output, ability to clear network logs, and some editor debates (Ace vs Monaco).