-
mainbranch (React 18 LTS):- Stable, production-ready with React 18 and latest dependencies.
- Repo URL
-
chore/upgrade-react-19branch:- Experimental, includes React 19 and the latest versions of all dependencies.
- Repo URL
- Use this branch if you want to try the newest React features and updates.
-
Other variants:
git clone https://github.com/purnasth/vite-react-tailwind-starter.git
cd vite-react-tailwind-starter-kitpnpm installpnpm devThe app will be available at http://localhost:5173.
Skip this section if you cloned the repo above. This is for those who want to create a similar project from scratch.
pnpm create vite@latest ./ --template react
# y to proceed
# Select a framework: react
# Select a variant: TypeScript + SWC
pnpm install
pnpm run devpnpm install tailwindcss @tailwindcss/viteimport { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
plugins: [react(), tailwindcss()],
});@import "tailwindcss";
@config "../tailwind.config.js";pnpm install -D prettier prettier-plugin-tailwindcssCreate a .prettierrc file:
{
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"useTabs": false,
"printWidth": 80,
"endOfLine": "auto"
}Add scripts to package.json:
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,json,css,scss,md}'",
"format:check": "prettier --check 'src/**/*.{js,jsx,ts,tsx,json,css,scss,md}'"react-router-dom— Routingreact-icons— Icon library
Install with:
pnpm install react-router-dom react-icons