Create your project
Start by creating a new Astro project if you don't have one set up already. The most common approach is to use create astro.
Terminalnpm create astro@latest my-projectcd my-project
Install Tailwind CSS
Run the
astro add
command to install bothtailwindcss
and@astro/tailwind
as well as generate atailwind.config.cjs
file.Terminalnpx astro add tailwind
- Terminal
npm run dev
- index.astro
<h1 class="text-3xl font-bold underline"> Hello world! </h1>