Index of every page on this site: llms.txt
All skills
tristanmanchester avatar

/styling-nativewind-v4-expo

@3323bc9
Run it yourself

Set up, repair, and build components with NativeWind v4 and Tailwind CSS v3 in Expo React Native apps. Use for an explicitly v4 project, v4 configuration failures, className interoperability, or v4 theming; not for NativeWind v5 or generic web Tailwind setup.

Use this Skill: https://skilld.dev/gh/tristanmanchester/agent-skills/styling-nativewind-v4-expo

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencestroubleshooting.md

≈646 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Troubleshooting NativeWind v4 in Expo

Always start here

  1. Restart Metro without cache:
npx expo start --clear
  1. Confirm Tailwind CLI works independently of NativeWind:
npx tailwindcss --input ./global.css --output output.css

If the class you expect is not present in output.css, your issue is Tailwind config/content, not NativeWind runtime.

Quick checks (90% of issues)

“className not applying” / everything looks unstyled

  • Confirm global.css exists.
  • Confirm metro.config.js withNativeWind(..., { input: "./global.css" }) points to it.
  • Confirm the entry component imports it exactly once.
  • Confirm tailwind.config.js content globs include all files that contain className strings:
    • ./App.{js,jsx,ts,tsx}
    • ./app/**/*.{js,jsx,ts,tsx} (Expo Router)
    • ./components/**/*.{js,jsx,ts,tsx}
  • Clear cache and restart.

Web looks unstyled

  • Confirm app.json sets:
    • expo.web.bundler = "metro"

Verify the NativeWind install from inside the app

NativeWind exposes a helper:

import { verifyInstallation } from "nativewind";

export default function App() {
  verifyInstallation(); // call inside component scope, not globally
  return null;
}

Remove it after you confirm the setup.

Enable debug logs

Run your start command with DEBUG=nativewind:

DEBUG=nativewind npx expo start --clear

Common React Native gotchas (looks like “NativeWind is broken”)

Colour classes don’t “cascade”

React Native doesn’t cascade text colour from a <View> to a nested <Text>. Move text-* classes onto the <Text> element.

Conditional styles

React Native can behave oddly when styles appear/disappear. Prefer explicit style pairs (both light + dark) rather than only setting one side.

Safe area utilities not working

  • Inspect the actual native root and existing SafeAreaProvider before adding one.
  • Expo Router supplies the usual route provider; do not duplicate it at that same root.
  • A separate native root or modal boundary may need its own provider. Check the boundary and inset measurements on the target platforms rather than applying a universal ban on nested providers.

Expo Router breaks after adding babel/metro config

If the Router stops finding routes, confirm:

  • Babel still uses babel-preset-expo as the base preset.
  • You restarted with npx expo start --clear.

If you see EXPO_ROUTER_APP_ROOT missing, consult Expo Router troubleshooting and ensure your entry point/babel config still matches Router expectations.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides comprehensive configuration guides and templates for setting up NativeWind v4 in Expo projects. Analysis identified minor security risks, including the recommendation to use a third-party project initialization tool and the potential for indirect prompt injection when auditing repository files for configuration errors.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • Runlayer8mo

    6/6 files flagged

  • ZeroLeaks6mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 3323bc9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Steadyupdated last month
metadata
{
  "version": "2.0.0",
  "reviewed": "2026-09-13"
}
Other metadata
compatibility
An Expo project using nativewind major 4 and tailwindcss major 3. Native peer versions must match the project's Expo SDK.

README badge

README badge for tristanmanchester/agent-skills/styling-nativewind-v4-expo