pickstack

React + Tailwind CSS

Utility-first CSS (v4). This page shows exactly what pickstack adds to a React project for Tailwind CSS: the packages, the new files and the changes to existing ones. Every combination is installed, built, linted and tested in CI.

$ npm create pickstack@latest my-app -- --framework react --modules tailwind --yes
Customize in the configurator

Packages it adds

PackageVersionType
@tailwindcss/vite^4.3.5dev
tailwindcss^4.3.5dev

Changes to existing files

src/App.tsx (changed)
⋯ 1 unchanged lines   export default function App() {   return (+    <main className="flex min-h-screen flex-col items-center justify-center gap-8 bg-slate-50 p-8 text-slate-900">+      <h1 className="text-3xl font-bold tracking-tight">my-app</h1>−    <main className="app">−      <h1 className="title">my-app</h1>       <Counter />     </main>   );⋯ 2 unchanged lines
src/components/Counter.tsx (changed)
⋯ 3 unchanged lines   const [count, setCount] = useState(0);     return (+    <div className="rounded-2xl bg-white p-8 text-center shadow-sm ring-1 ring-slate-200">+      <p className="text-5xl font-bold tabular-nums">{count}</p>+      <div className="mt-6 flex justify-center gap-3">−    <div className="card">−      <p className="count">{count}</p>−      <div className="row">         <button           type="button"+          className="rounded-lg bg-slate-900 px-4 py-2 text-white hover:bg-slate-700"−          className="btn"           onClick={() => setCount((n) => n - 1)}         >           -1         </button>         <button           type="button"+          className="rounded-lg bg-slate-900 px-4 py-2 text-white hover:bg-slate-700"−          className="btn"           onClick={() => setCount((n) => n + 1)}         >           +1⋯ 6 unchanged lines
src/index.css (changed)
+@import "tailwindcss";−:root {−  font-family: system-ui, sans-serif;−  color: #0f172a;−  background: #f8fafc;−}  −body {−  margin: 0;−}− −.app {−  min-height: 100vh;−  display: flex;−  flex-direction: column;−  align-items: center;−  justify-content: center;−  gap: 2rem;−  padding: 2rem;−  box-sizing: border-box;−}− −.title {−  font-size: 1.875rem;−  margin: 0;−}− −.nav {−  display: flex;−  gap: 1rem;−}− −.link {−  color: #475569;−  text-decoration: none;−  font-weight: 500;−}− −.link:hover {−  color: #0f172a;−}− −.page {−  display: flex;−  flex-direction: column;−  align-items: center;−  gap: 1.5rem;−}− −.text {−  max-width: 28rem;−  text-align: center;−  color: #475569;−}− −.card {−  background: #fff;−  padding: 2rem;−  border-radius: 1rem;−  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);−  text-align: center;−}− −.count {−  font-size: 3rem;−  font-weight: 700;−  margin: 0;−  font-variant-numeric: tabular-nums;−}− −.row {−  margin-top: 1.5rem;−  display: flex;−  justify-content: center;−  gap: 0.75rem;−}− −.btn {−  background: #0f172a;−  color: #fff;−  border: 0;−  border-radius: 0.5rem;−  padding: 0.5rem 1rem;−  font: inherit;−  cursor: pointer;−}− −.btn:hover {−  background: #334155;−}− 
vite.config.ts (changed)
+import tailwindcss from "@tailwindcss/vite"; import react from "@vitejs/plugin-react"; import { defineConfig } from "vite";   export default defineConfig({+  plugins: [react(), tailwindcss()],−  plugins: [react()], });  

Project files

Related templates