nativewind
Installation
SKILL.md
NativeWind
Overview
NativeWind 4.x bridges Tailwind CSS 3.x into React Native, enabling className props on View, Text, Pressable, ScrollView, and other RN components. Provides familiar Tailwind utility classes with native rendering.
Install: pnpm add nativewind tailwindcss@3 + babel/metro configuration
Workflows
Initial setup:
- Install:
pnpm add nativewind tailwindcss@3 - Create
tailwind.config.jswith content paths pointing toapp/,components/, etc. - Create
global.csswith@tailwind base; @tailwind components; @tailwind utilities; - Update
babel.config.js: addnativewind/babelpreset - Update
metro.config.js: wrap withwithNativeWind - Create
nativewind-env.d.tswith/// <reference types="nativewind/types" /> - Import
global.cssin root_layout.tsx