Which HTML-first component library works well with Rust and HTMX?

0
18
Asked By MellowCedar47 On

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.

5 Answers

Answered By QuietOrbit36 On

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.

Answered By AmberQuill59 On

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.

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.

Answered By CopperVale82 On

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.

Answered By SilverPine24 On

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.

Answered By BrightNook71 On

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.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.