styling-nativewind-v4-expo
Installation
SKILL.md
NativeWind v4 for Expo (React Native)
Non‑negotiables (v4)
- Use Tailwind CSS v3 and include
presets: [require("nativewind/preset")]intailwind.config.js. - Keep exactly one Tailwind entry CSS file (commonly
global.css) and keep its path consistent across:metro.config.js→withNativeWind(..., { input: "./global.css" })- your app entry →
import "./global.css"(orimport "../global.css"fromapp/_layout.tsx)
- Keep
nativewind/babelin Babelpresetsand setjsxImportSource: "nativewind"onbabel-preset-expo. - After any config change, restart Metro without cache:
npx expo start --clear.
Quick start checklist
Copy/paste and tick off: