xxxxxxxxxx
npx create-react-app app --template typescript
cd app
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
// tailwind.config.js
content: ["./src/**/*.{js,jsx,ts,tsx}"],
theme: {
colors: {
primary: "#101010",
mainback: "#1D0070",
white: "#fff",
black: "#000",
default: "#D2D5DA",
number: "#4B5563",
subnumber: "#111827",
},
screens: {
sm: { max: "768px", min: "350px" },
md: "768px" ,
lg: "1080px" ,
xl: {min: "1440px"},
},
},
// src/index.css
@tailwind base;
@tailwind components;
@tailwind utilities;
xxxxxxxxxx
npm create vite@latest . -- --template react-ts
npm install -D tailwindcss postcss autoprefixer && npx tailwindcss init -p
# Modify in ./tailwind.config.js:
content: ["./index.html", "./src/**/*.{js,jsx,ts,tsx}"],
# Insert in ./src/index.css:
@tailwind base; @tailwind components; @tailwind utilities;
npm run dev