I tried to configure a new project using React, TypeScript and TailwindCSS v4 but Tailwind isn't applying.
Here is my installation:
npx create-react-app web
npm install --save-dev typescript @types/node @types/react @types/react-dom @types/jest
npx tsc --init
npm install --save-dev tailwindcss @tailwindcss/postcss postcss
I could use npx create-react-app web --template typescript but this way puts TypeScript in production dependencies. It is why I used my first steps.
Now, regarding Tailwind v4 doc I created postcss.config.mjs to the root, (near package.json) with this code:
export default {
plugins: {
"@tailwindcss/postcss": {},
}
}
Then, in src/index.css, I removed all styles and I added only this line:
@import "tailwindcss";
Now I changed the App extension from App.js to App.tsx with this sample code:
function App() {
return (
<h1 className="text-3xl font-bold underline">
Hello world!
</h1>
);
}
export default App;
and this is the index.tsx:
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
reportWebVitals();
Now I run npm start but Tailwind CSS not applied. Here is a screen:
Versions:
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-scripts": "5.0.1",
"typescript": "^4.9.5",
"tailwindcss": "^4.0.12",
"postcss": "^8.5.3",
Did I miss a step?

create-react-app. It's outdated for at least 3 years. The two common ways are Vite and Next.js