Search code examples
next.jstailwind-csshtmxshadcnui

How to write HTMX with Tailwind Css and Shadcn UI?


I found out HTMX seems to be able to replace JavaScript in the client side.

Currently I have a NextJs(ReactJs) project, and how can I convert such a project into HTMX based project while keeping Tailwind and ShadCn UI ?


Solution

  • According to ShadCn UI Docs at https://ui.shadcn.com/docs, quote: "You can use any framework that supports React. Next.js, Astro, Remix, Gatsby etc.", so ShadCn UI cannot be used with Leptos yet...

    But you still can use Tailwind with Leptos:

    If you use JS/TS: use HTMX + Astro fullstack + Tailwind

    OR HTMX + Bun + Elysia + Turso(databases)

    If you use Rust: use... HTMX + Leptos fullstack + Tailwind

    Quote from https://leptos.dev/: "Tools like Tailwind integrate with Leptos perfectly..."

    or HTMX + Axum backend + Askama HTML templating