nativewind logo

nativewind

nativewind

hairyf/skills172installs19stars

SKILL.md

Full skill instructions

Skill is based on NativeWind v5 (Tailwind CSS v4), generated at 2026-02-26.

NativeWind compiles Tailwind CSS for React Native: className on components, StyleSheet.create on native and reuse of the Tailwind stylesheet on web. It supports media/container queries, pseudo-classes (hover, focus, active), platform variants (ios:, android:, native:, web:), dark mode, and custom theme/utilities via CSS-first config.

Core References

TopicDescriptionReference
SetupCSS file, Metro withNativewind, PostCSS, app entry, optional lightningcss pincore-setup
ConfigurationCSS-first config, @theme, @source, nativewind/theme, custom utilities/variantscore-config
v5 Tailwind foundationBuilt on Tailwind v4, CSS-first, web vs native supportcore-v5-tailwind-foundation
v5 Unitspx, %, vw/vh, rem, em on native; dp vs px; rem sizingcore-v5-units
v5 Functions & directives@import, @theme, @utility; var(), calc(), env(), color-mix(); RN functionscore-v5-functions-directives
v5 Style specificityOrder of precedence, !important, merging className and stylecore-v5-style-specificity

Features

TopicDescriptionReference
Styling componentsclassName usage, custom vs third-party, styled() / cssInterop / remapProps, nativeStyleToPropfeatures-styling
Platform & responsivePlatform variants, units, breakpoints, safe-area utilitiesfeatures-platform
v5 ResponsiveBreakpoints on native, media queries, platform media, reactive updatesfeatures-v5-responsive
States & dark modehover/focus/active, disabled/empty, group modifiers, dark:, data attributesfeatures-states
v5 States & pseudo-classesDetailed pseudo-class table, selection/placeholder, group, ltr/rtlfeatures-v5-states-pseudo
v5 Third-party guideWhen className isn't passed, multiple style props, dynamic mapping @propfeatures-v5-third-party-guide
Theming & colors@theme tokens, vars() for runtime CSS variables, color behavioradvanced-theme

API (v5)

TopicDescriptionReference
withNativewindMetro wrapper options (globalClassNamePolyfill, typescriptEnvPath)api-with-nativewind
styledThird-party components, nativeStyleToProp, multiple className propsapi-styled
vars & runtime variablesvars(), VariableContextProvider, useUnstableNativeVariableapi-vars-runtime
cssInterop / remapPropsLegacy API (deprecated; use styled) — migration referenceapi-css-interop-remap

Advanced

TopicDescriptionReference
Migrate v4 → v5Steps, breaking changes, deprecationsadvanced-migrate-v4

Best Practices

TopicDescriptionReference
Correctness & debuggingExplicit light/dark, colors on Text not View, cache, DEBUG, verifyInstallationbest-practices-performance
v5 DeprecationsuseColorScheme → RN, cssInterop/remapProps → styled, @prop modifierbest-practices-v5-deprecations