August 24, 2022
Astro has first-class support for Tailwind CSS, so it's really easy to add Tailwind to your Astro website.
To add Tailwind, run this command in the terminal:
npm run astro add tailwind
That will install and set up the appropriate package (@astrojs/tailwind
) in your astro.config.mjs
file, like this:
import tailwind from "@astrojs/tailwind";
export default {
// ...
integrations: [
// ...
tailwind(),
],
};
Now, just restart the dev server and Tailwind will be included in your site and working! You can start using Tailwind classes in your .astro
and React/Vue/Svelte/etc files.
The terminal command above also created a tailwind.config.cjs
configuration file, which you can use to customize Tailwind CSS as is standard.
Tufts Meal Plan Wrapped
Mar 2, 2024
Building an e-ink picture frame that displays an iCloud photo album
Jan 9, 2024
2023 in review
Jan 5, 2024
Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iām working on!