79497399

Date: 2025-03-10 08:23:03
Score: 1
Natty:
Report link
  1. Install Tailwind CSS and Dependencies - npm install -D tailwindcss postcss autoprefixer

  2. Initialize Tailwind CSS - npx tailwindcss init -p

  3. Open tailwind.config.js -

    /** @type {import('tailwindcss').Config} / export default { content: [ "./index.html", "./src/**/.{js,ts,jsx,tsx}", ], theme: { extend: {}, }, plugins: [], }

  4. Inside your main CSS file - src/index.css , add:

    @tailwind base; @tailwind components; @tailwind utilities;

  5. In App.jsx, import the CSS file: import './index.css';

  6. Now start your Vite project.

Usage -

const App=() =>{
  return (
    <div className="flex items-center justify-center">
      <h1 className="text-3xl font-bold text-blue-600">Hello, 
                   Tailwind CSS!</h1>
    </div>
  );
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @type
  • User mentioned (0): @tailwind
  • User mentioned (0): @tailwind
  • User mentioned (0): @tailwind
  • Low reputation (1):
Posted by: Nancy Gupta