expo-tailwind-setup

Configure Tailwind CSS v4 with NativeWind v5 for Expo projects.

Updated May 7, 2026
One-click install
npx skills add https://github.com/softwarebyze/Backgammon-Mastermind --skill expo-tailwind-setup-softwarebyze
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: expo-tailwind-setup
Source: https://github.com/softwarebyze/Backgammon-Mastermind/tree/main/.agents/skills/expo-tailwind-setup
Command: npx skills add https://github.com/softwarebyze/Backgammon-Mastermind --skill expo-tailwind-setup-softwarebyze

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of getting consistent Tailwind CSS v4 styling working reliably in an Expo (React Native) project across iOS, Android, and Web without fighting configuration differences.

Core Features & Use Cases

  • Expo + Tailwind v4 with React Native: Configure Tailwind’s CSS-first workflow using react-native-css for CSS runtime support.
  • NativeWind v5 Metro integration: Apply the required withNativewind Metro transformer setup for correct Tailwind class handling.
  • Practical component wrappers: Create useCssElement-wrapped primitives (View, Text, ScrollView, Image, Animated) so className works as expected.
  • Use case: If you’re building a cross-platform Expo UI (including lists, buttons, and images) and want to use className="..." everywhere with Tailwind utilities, this guide helps you set up the full toolchain and the required wrappers.

Quick Start

Ask the skill to generate an Expo-compatible Tailwind v4 setup using react-native-css and NativeWind v5, including Metro, PostCSS, global CSS imports, and the required useCssElement component wrappers.

Frequently Asked Questions about expo-tailwind-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Tailwind CSS v4 in an Expo React Native project?

To set up Tailwind CSS v4 in Expo, configure Metro with NativeWind v5, add a PostCSS config using @tailwindcss/postcss, import utilities into global.css, and wrap core components with useCssElement to enable className styling.

Does Tailwind CSS work with React Native and Expo on iOS, Android, and Web?

Yes, Tailwind CSS works universally across iOS, Android, and Web in Expo by integrating react-native-css for runtime CSS support and NativeWind v5 for the Metro transformer configuration.

Why do I need to wrap React Native components with useCssElement for Tailwind styling?

Wrapping React Native primitives like View, Text, and ScrollView with useCssElement is required to map the className prop to NativeWind v5's CSS runtime, enabling Tailwind utility classes to apply styles correctly across platforms.

What's the best way to configure Metro for NativeWind v5 in an Expo app?

The best way to configure Metro for NativeWind v5 is by applying the withNativewind transformer wrapper to your Expo Metro configuration, ensuring proper handling of Tailwind CSS classes during the React Native build process.

Can I use Tailwind theme variables and preflight styles in a React Native app?

Yes, you can use Tailwind theme variables and preflight styles in React Native by importing them into a global.css file and processing it with @tailwindcss/postcss, which feeds the CSS-first workflow into the react-native-css runtime.

Why is my Expo Tailwind className styling not working across platforms?

Expo Tailwind className styling fails when Metro lacks the withNativewind transformer, PostCSS config is missing @tailwindcss/postcss, or React Native components are not wrapped with useCssElement to enable the NativeWind v5 CSS runtime.