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.

referencesthird-party-components.md

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

Third‑party components (remapProps / cssInterop)

Decision guide

  • Prefer plain className when the component forwards className correctly.
  • Use remapProps when a component has multiple style props and you want *Class props.
  • Use cssInterop when you need to map a class prop to a style prop (and optionally extract style attributes into non-style props).

Avoid using these for your own app components; for your own components, accept className and merge it.

remapProps (multiple style props)

import { remapProps } from "nativewind";

/**
 * ThirdPartyButton has buttonStyle + labelStyle
 */
const StyledThirdPartyButton = remapProps(ThirdPartyButton, {
  buttonClass: "buttonStyle",
  labelClass: "labelStyle",
});

// Usage
<StyledThirdPartyButton buttonClass="bg-blue-500" labelClass="text-white" />;

Notes:

  • remapProps(component, { "new-prop": "existing-prop" }) creates a new prop and maps it.
  • remapProps(component, { prop: true }) overrides an existing prop.

cssInterop (map className → style, extract attributes)

Example based on TextInput patterns:

import { TextInput } from "react-native";
import { cssInterop } from "nativewind";

cssInterop(TextInput, {
  className: {
    target: "style",
    nativeStyleToProp: {
      textAlign: true,
    },
  },
  placeholderClassName: {
    target: false,
    nativeStyleToProp: {
      color: "placeholderTextColor",
    },
  },
  selectionClassName: {
    target: false,
    nativeStyleToProp: {
      color: "selectionColor",
    },
  },
});

Guidelines:

  • Call cssInterop(...) once (at app entry) before the component is rendered.
  • Keep mappings tiny and explicit; do not “globally interop everything”.

Editor IntelliSense for custom props (VS Code)

If you introduce custom class props (e.g. headerClassName), extend Tailwind IntelliSense:

{
  "tailwindCSS.classAttributes": ["class", "className", "headerClassName"]
}

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