ruizrica/agent-pi/expo-tailwind-setup
- community
Checking that the SKILL.md file is still in the repository.
Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling
Install
npx vskill@latest install ruizrica/agent-pi/expo-tailwind-setupSKILL.md
The same SKILL.md was published earlier as openai/plugins/expo-tailwind-setup.
Tailwind CSS Setup for Expo with react-native-css
This guide covers setting up Tailwind CSS v4 in Expo using react-native-css and NativeWind v5 for universal styling across iOS, Android, and Web.
Overview
This setup uses:
- Tailwind CSS v4 - Modern CSS-first configuration
- react-native-css - CSS runtime for React Native
- NativeWind v5 - Metro transformer for Tailwind in React Native
- @tailwindcss/postcss - PostCSS plugin for Tailwind v4
Installation
Add resolutions for lightningcss compatibility:
- autoprefixer is not needed in Expo because of lightningcss
- postcss is included in expo by default
Configuration Files
Metro Config
Create or update metro.config.js:
PostCSS Config
Create postcss.config.mjs:
Global CSS
Create src/global.css:
IMPORTANT: No Babel Config Needed
With Tailwind v4 and NativeWind v5, you do NOT need a babel.config.js for Tailwind. Remove any NativeWind babel presets if present:
CSS Component Wrappers
Since react-native-css requires explicit CSS element wrapping, create reusable components:
Main Components (src/tw/index.tsx)
Image Component (src/tw/image.tsx)
Animated Components (src/tw/animated.tsx)
Usage
Import CSS-wrapped components from your tw directory:
Custom Theme Variables
Add custom theme variables in your global.css using @theme:
Platform-Specific Styles
Use platform media queries for platform-specific styling:
Apple System Colors with CSS Variables
Create a CSS file for Apple semantic colors:
Then use in components:
Using CSS Variables in JavaScript
Use the useCSSVariable hook:
Key Differences from NativeWind v4 / Tailwind v3
- No babel.config.js - Configuration is now CSS-first
- PostCSS plugin - Uses
@tailwindcss/postcssinstead oftailwindcss - CSS imports - Use
@import "tailwindcss/..."instead of@tailwinddirectives - Theme config - Use
@themein CSS instead oftailwind.config.js - Component wrappers - Must wrap components with
useCssElementfor className support - Metro config - Use
withNativewindwith different options (inlineVariables: false)
Troubleshooting
Styles not applying
- Ensure you have the CSS file imported in your app entry
- Check that components are wrapped with
useCssElement - Verify Metro config has
withNativewindapplied
Platform colors not working
- Use
platformColor()in@media iosblocks - Fall back to
light-dark()for web/Android
TypeScript errors
Add className to component props:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/expo-tailwind-setup/SKILL.md
Popularity
- Repository stars
- 205
- Repository forks
- 35
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ruizrica/agent-pi/expo-tailwind-setup)