I'm a backend-focused developer building a web app with Rust and HTMX. I'm comfortable integrating templates with a backend, but creating polished UI components from scratch is difficult for me. I'm looking for a library with ready-made headers, buttons, sidebars, forms, modals, and similar components that works mainly with HTML and CSS. A small amount of JavaScript for interactivity is fine, but I'm not using React, Angular, or a single-page application setup. I've been considering Preline and would appreciate recommendations for comparable or better options.
5 Answers
If you need a very broad component selection, Ant Design offers a lot out of the box, including advanced tables, charts, and form controls. The downside is that it is more oriented toward JavaScript application frameworks, so it may be less convenient with Rust and HTMX than a more HTML-first option. For your setup, I’d start with Preline, DaisyUI, or Bootstrap before choosing it.
Bootstrap is the safe, practical answer here. It has a large collection of familiar components, is mostly HTML and CSS, and its optional JavaScript works fine with backend-rendered templates. It may not feel as modern as some newer libraries, but it is well documented and easy to integrate.
Libraries modeled after shadcn/ui provide modern styling and plenty of control, but they usually involve copying component code into your project and maintaining it yourself. That can work well if you want full customization, but it is more hands-on than Preline or DaisyUI. For a backend-rendered HTMX project, an HTML-first library will probably keep the amount of work lower.
For a server-rendered app, DaisyUI is worth a look. You compose components with HTML classes, and it provides buttons, modals, dropdowns, forms, and similar pieces without requiring React. Alpine.js can be added later for small interactive behaviors while keeping everything close to the HTML. Preline is also a solid choice, but DaisyUI fits this workflow particularly well.
Bulma is a lightweight CSS framework and can be pleasant to customize, but it does not provide as many complete interactive components. You would likely need to implement things such as modal behavior yourself. Tailwind-based component collections can look excellent, though some require more manual assembly or a paid license.

Thanks, I’ll take a look at those options.