14
21 Comments

Who's using HTMX?

I've recently discovered htmx and it has been a breath of fresh air in terms of productivity as a solo dev.

I'm curious if anyone else is using it or other similar tools like unpoly or hotwire and what your experience has been so far?

If you haven't heard of it, you basically send HTML fragments from the backend and it swaps it into the DOM at the specified location (using CSS selectors). And it's done using HTML attributes (like AlpineJS).

Happy Building!

posted to Icon for group Developers
Developers
on January 22, 2022
  1. 2

    I gave HTMX a try on an ASP.NET MVC project. My intention was to create an search form that auto-updated the results, so I used some of the modifiers from an example in their docs: "keyup changed delay:500ms".

    It was really quick to get set up, even on the backend, so that was really nice.

    Unfortunately it only seemed to work about 50% of the time. Sometimes it just failed silently, with no console messages or indication of why it wasn't fetching. Didn't have time to debug it, so I gave up and moved on.

    1. 2

      huh - Ive not had any silent failures - I usually just forget to specify a valid target. The discord has been super helpful for debugging help though if you pick it up again.

  2. 2

    Using Hotwire for Testkit and it's been a blast!
    I'm a frontend developer originally, but hotwire makes a lot of things so easy!

    Unfortunately, it's still a bit hard to find resources (esp. when used with Rails)

    1. 2

      Hey, nice landing page!

      I would have though Hotwire would have the best docs for Rails since it came from Basecamp? Glad its been a good experience though. I like how there are multiple libraries out there pushing this model of web development forward.

      1. 1

        Thanks! They do have good docs for generic usage, but for rails-specific usage, you have to find the docs in the Hotwire code itself, which is a bit annoying.

  3. 2

    Pretty much all of https://phish.report is htmx-based! (only super local/interactive stuff like collapsing cards, tooltips, etc. is done using JavaScript)

    I've found it incredibly enabling. I really wanted a modern feeling app but I'm a backend dev really so I always gave up when trying to learn frontend frameworks. With htmx, I just write dumb backend templates and I get nice smooth frontend experience.

    Would definitely recommend giving it a go

    1. 1

      Hey cool site. How do you filter out people from mis-reporting a phishing site?

      1. 1

        Currently I'm just careful to only automatically submit reports to places that are tolerant of mis-reports. E.g. you have to send report emails yourself

        In future I'm hoping that gating full automation to paid accounts will be sufficient 🤞🏻 Definitely not got capacity/budget to moderate reports!

  4. 1

    That library seems like a way to avoid learning basic vanilla js and bundling tools.

    If a person already knows modern front end, cool. If a person has been avoiding learning es6 / typescript and is looking to have HTMX stave off learning a bit longer i think that’s possibly a mistake.

  5. 1

    Many redditors mention htmx in django subreddit. But I like Vue js

    1. 1

      Ya I really like Vue too. And they can work well together by dropping in Vue on specific pages that need more interactivity.

  6. 1

    I am exploring Hotwire and LiveView at the moment.

    1. 1

      nice! I tried LiveView a while back but I was a but I didn't like how it only used websockets. But that was a while ago so maybe it's changed now? It was a nice experience though.

      1. 1

        It still does. On other platforms I think it's wasteful but not on Beam. I hope we get to combine live components with normal pages, that would be my preference...

  7. 1

    Hello,

    I have used HTMX in one project before for a client.

    I found it quite useful and did allow me to quickly write an interactive and dynamic website in Django without any additional Javascript.

    You do need to adjust a bit in the way that you think about your views (at least in Django) but definitely easy to use.

    1. 2

      Ya, I agree you definitely have to shift your thinking around organizing views. At first it felt weird to fetch just an edit form from the backend instead of using Alpine or Vue to toggle it on or off but now it is totally normal. And I love the full power of a backend template with access to the session and the db because I can tweak things so fast if I need new data inputs etc.

  8. 1

    So far I've worked on just one project that involved the use of Htmx. We used Htmx because it allowed us to build modern and powerful user interfaces with simple markups.

    htmx has an extension mechanism, so you can pull in stuff or write your own extension:

    https://htmx.org/extensions/

    1. 1

      nice! I haven't touched the extensions yet but will check it out :)

  9. 1

    Never heard of this before but will definately be spending an hour tomorrow looking into this. Interesting 🤔

  10. 1

    Really does feel like AlpineJS, with a hint of Remix in terms of the nested queries and content refreshes. Maybe it's just because I'm not familiar with the syntax but it feels like a large file of htmx might be difficult to read. Might give it a go though, thanks for sharing! :)

    1. 1

      I'm used to reading tailwind in HTML so adding a bit of htmx syntax fits my brain now. But it certainly is an adjustment. If you want to be super minimal though you can drop in an hx-boost="true" on existing <a> tags and <form> tags which will "just work" but then allow you to not do full page loads. It can get more verbose but it can also just be a couple new attributes.

Trending on Indie Hackers
I spent $0 on marketing and got 1,200 website visitors - Here's my exact playbook User Avatar 42 comments I built eSIMKitStore — helping travelers stay online with instant QR-based eSIMs 🌍 User Avatar 20 comments Codenhack Beta — Full Access + Referral User Avatar 20 comments Veo 3.1 vs Sora 2: AI Video Generation in 2025 🎬🤖 User Avatar 18 comments 🚀 Get Your Brand Featured on FaceSeek User Avatar 16 comments Day 6 - Slow days as a solo founder User Avatar 14 comments