Which HTML-first component library works well with Rust and HTMX?
Asked by
MellowCedar47
I'm a backend-focused developer building a web app with Rust and HTMX. I'm looking for a component library with ready-made headers, buttons, sidebars, forms, modals, dropdowns, and similar UI pieces so I don't have to design everything from scratch. It should work primarily with HTML and CSS, with optional lightweight JavaScript for interactions, rather than requiring React, Angular, or a full SPA setup. Preline looks promising, but I'd like to hear about comparable or better options for server-rendered pages.
Answers
Tailwind Plus has polished component examples and can be customized heavily, but itโs paid and tends to involve a lot of utility classes. Itโs best if youโre comfortable assembling and maintaining your own reusable server-rendered components rather than expecting a plug-and-play library.
Reply to this answer
Ant Design and MUI offer very broad component collections, including advanced tables and charts, but theyโre generally aimed at JavaScript application builds and may be more setup than you want for Rust and HTMX. If you want maximum control with Tailwind, a copy-into-your-project approach such as shadcn-style components can work, though it requires more maintenance because you own the copied component code.
Reply to this answer
DaisyUI is probably worth checking out. It provides component styles through Tailwind classes, so you can use buttons, modals, dropdowns, forms, and other pieces directly in your HTML. It doesnโt require JavaScript for the basic markup and styling, and you can add Alpine.js or HTMX when you need interactivity. It fits server-rendered pages well and gives a similar experience to Preline.
Reply to this answer
Preline itself is a solid choice if you already like its design. DaisyUI is another good Tailwind-based option, while Bulma is lightweight and CSS-only. Bulma gives you the styling foundation, but youโll need to implement interactive behavior such as modal toggling yourself.
Reply to this answer
Bootstrap is the dependable, boring-but-effective choice here. Itโs mostly HTML and CSS, has a large collection of prebuilt components, and includes optional JavaScript for things like modals and dropdowns. It works nicely with backend-rendered templates without requiring a frontend framework.
Reply to this answer
Add your answer
Answers are reviewed before publication.
MellowCedar47: Thatโs helpful. Iโm mainly looking for common app elements like headers, buttons, sidebars, and forms, so Iโll compare Preline and DaisyUI first.