Install and Configure Tailwind CSS
Install and Configure Tailwind CSS
We use Tailwind CSS for styling, and also Framer Motion for animations.
1) Install Tailwind CSS and PostCSS Plugins
Run:
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p2) Configure Tailwind
In tailwind.config.js, update content:
export default {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [],
};3) Add Tailwind to CSS
In index.css, add:
@tailwind base;
@tailwind components;
@tailwind utilities;4) Custom Font (Optional)
Add this in index.html inside <head>:
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">And in body tag:
<body class="bg-black font-[Poppins]">

