Using TailwindCSS with Hono/JSX
Hello,
When using only Hono, I serve html (hono-jsx) on a single endpoint, but I would like to style this with TailwindCSS. Is there a straight-forward way to accomplish this? My app is hosted via Convex (if that makes a difference).
4 Replies
You can either use the tailwindcss CDN file or use something like vite to compile your TailwindCSS. There are some examples in https://github.com/honojs/examples repo
GitHub
GitHub - honojs/examples: Examples using Hono.
Examples using Hono. Contribute to honojs/examples development by creating an account on GitHub.
@haramman I use it without any problems with default installation. Follow that guide: https://tailwindcss.com/docs/installation
Installation - Tailwind CSS
The simplest and fastest way to get up and running with Tailwind CSS from scratch is with the Tailwind CLI tool.
(install concurrently package to use that command)
and don't forget to link output.css on your page