5 ms·
Still no good component or UI libraries for HTMX.
by klaussilveira 2y ago
Still no good component or UI libraries for HTMX.
- xigurat 2y agoProbably there will never be, that's like saying "Still no good component or UI libraries for HTML". HTMX philosophy is to be timeless and agnostic as HTML is, is just a nice extension on top.
- clivestaples 2y agoThis is the sticking point for me. I get so many gains in Rails but I quickly sink into time-consuming component research/building. My eyes are always open for HTML/JS component libraries along the lines of react-aria.
- Weetile 2y agoI've had a great experience using Golang + HTMX + DaisyUI using the tailwind-cli-extra standalone tool, negating the requirement for npm at all.
- nox101 2y agoCan webcomponents be trivially used with HTMX? Like for example: https://shoelace.style/ https://shoelace.style/
- klaussilveira 2y agoShoelace is great, but not robust. No data table, no date/time picker, no pagination, no sidebar.
- alexpetros 2y agoAnything that can be loaded as a stylesheet or a script tag works great with htmx. These are not htmx-branded libraries... because they're just web libraries.
- klaussilveira 2y agoRight, but then you are glueing things together and mixing and trying to match CSS so they all play together. AirDatepicker here, tomselect there, datatables here, popper there. All of sudden you lost a lot of time trying to make things look like one cohesive unit, when you should be doing your app. Meanwhile, I have v0 generate the whole skeleton for me, with composable reusable components, and just got the API done.
- neeleshs 2y agoInterestingly I did something similar with Claude, asking it to generate tailwind/HTML components instead. And copy/pasting them as Thymeleaf fragments for a java/springboot + htmx project.
- yawaramin 2y agoYeah maybe, if you are using all these ready-made components. But with htmx...maybe you won't need to. Maybe you'll just end up using basic HTML widgets and the result will be simple and fast.
- mlboss 2y agoThat is exactly the point of HTMX. Use your backend stack and sprinkle some hx tags.
- danpad 2y agoExcuse me - do you understand what a component library is? It's a whole framework from element wrappers, styling, animations to pre-made pages, filtering and sorting functions on tables etc. Think MUI, Bootstrap or PrimeNG. HTMX is just "replace this with response", you'll still have to write all the CSS classes, manually add them to all the elements, do animations yourself etc. I like HTMX, but I am tired of backend and hobby programmers shilling it at every opportunity. Try to write a reasonably complex website with it and give it your friend to maintain and improve. You'll understand why frontend frameworks exist. HTMX sends you back to the HTML-in-PHP ages with homebrew ORMs and what not, because there's no unified way of doing things.
- neeleshs 2y agoThen something like DaisyUI/HyperUI + HTMX? And depending on the backend you can do components (eg: For Django there is django-cotton and others that help).
- danpad 2y agoYes, I could use those. But I gotta ask myself: - will my client have problems finding someone that speaks Czech/Slovak and also knows DaisyUI/HyperUI/HTMX/Django? - are those techs gonna be maintained in 5 years? - what's the bus factor on the techs? Is it several people's project or a one (wo)man show? All while there's React+<one of the big component libraries> right at your disposal...
- yawaramin 2y agoYes, there is a 'unified' way of doing things. In a single backend stack at least. And that way is...make a component library. Using your backend stack. It doesn't have to be HTML-in-PHP era. There are embedded HTML generation libraries for every mainstream language nowadays. You can just use whatever CSS you like and write any components you need. Eg I used Bulma, copy-pasted their HTML examples, and just wrapped them up as components. If you are bemoaning the lack of prefab component libraries, well that's how backend development goes. Everybody and their dog has a backend stack and HTML generation system they like, and then eventually maybe some component libraries will emerge for the popular ones. That's the tradeoff for the freedom htmx gives you to work in any backend. You write some components yourself. Not the end of the world.