# Navigate to your React directory
cd path/to/your/react/directory
# Install Tailwind CSS as a development dependency
npm install -D tailwindcss
# Initialize Tailwind CSS configuration
npx tailwindcss init
tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
index.css
@tailwind base;
@tailwind components;
@tailwind utilities;