Last updated on August 30, 2025
Migrate from v4
Breaking Changes & Prerequisites
Before upgrading to Nativewind v5, your project must meet the following version requirements:
Tailwind CSS v4.1+
Nativewind v5 is built on top of Tailwind CSS v4.1+. You must upgrade your Tailwind configuration and tooling accordingly.
Migration Tip: Refer to the Tailwind CSS v4 Upgrade Guide for detailed steps.
React Native 0.81+
React Native 0.81 introduces architectural changes that Nativewind v5 relies on, including improvements to the StyleSheet and layout engines.
Use react-native upgrade
or migrate your setup manually to update.
Earlier versions can work with limited functionality. Nativewind only provide support for 0.81+
React Native New Architecture
A number of styles require the new architecture.
The old architecture can work with limited functionality. Nativewind only provide support for the new architecture.
React Native Reanimated v4+
Nativewind v5 uses internal features that depend on Reanimated v4+. Ensure your project uses this version to avoid runtime crashes or build issues.
Note: Reanimated v4 introduces its own breaking changes — consult the Reanimated v4 changelog when upgrading.
React Native CSS
Nativewind previously used a transient dependency on a library called react-native-css-interop
. This library has been renamed to react-native-css
and moved to a peerDependency
and will require installation.
Nativewind will no longer be tied to a specific version of react-native-css
and the two libraries can be updated individually.
Breaking changes
Tailwind CSS changes
Please ensure you are familar with the Tailwind CSS upgrade guide. It has a number of breaking changes, renamed styles and deprecations.
Classname changes
Tailwind v4 changed the standard for its classnames. As such, these Nativewind classes have also been renamed
elevation-sm
has been renamed toelevation-xs
elevation
has been renamed toelevation-sm
Animation changes
Nativewind has switched from using a custom animation engine to Reanimated CSS animations. You may find there are implementation differences between the two engines.
JavaScript Theme Functions
The JavaScript theme functions have been removed and replaced with CSS equitant functions. Please see the
shadow-*
The shadow-*
classes now use boxShadow
style. Previously they used shadowColor
, shadowOffset
, shadowOpacity
and shadowRadius
. There may be a visual difference.
Line Height
Line height numeric values are parsed as if they had the em
unit. Previously they were parsed as a unit-less value. To migrate, simply divide the old value by the font-size.
rem
rem
is no longer exported and cannot be changed at runtime. If you require Tailwind CSS to dynamically change values, you should update your theme to use a CSS variable instead of rem
Dynamic mapping modifier
The dynamic mapping modifier has been renamed to @prop
.
Deprecations
Nativewind v5 preserves its existing API. Your usage of:
className
styled
...will continue to work without modification.
However, several features are being deprecated and will emit runtime warnings during development. These features will be removed in a future major release.
Warning: Deprecated features will continue to function in v5 but should be migrated away from as soon as possible.
However, there will be a number of breaking changes to how Nativewind functions and its configuration file that may affect you.
JSX Transform → Replaced by Import Rewrites
Nativewind v5 removes the JSX transform that previously injected Tailwind support into individual JSX elements. This has been replaced by a new import rewrite system.
This does not require any configuration change, but may affect your app if you are performing your own import rewrites. Previously Nativewind would change this code:
Now the import
will be rewritten to import { View, Text } from 'react-native-css/react-native'
The move to import rewrites is driven by a broader shift in the React Native ecosystem of publishing compiled libraries. Nativewind previously took advantage that libraries were always compiled locally which allowed us to override the jsxImportSource
. When libraries are compiled externally, their JSX is already transformed. The new shift to import rewrites is similar to how existing libraries such as react-native-web
work.
cssInterop
/ remapProps
→ Replaced by styled()
The cssInterop
and remapProps
APIs are deprecated and replaced with a unified styled
API. It accepts the same options as cssInterop
/remapProps
and returns the same component. The remapProps
mode is available via a new 3rd parameter:
By default styled()
enables the transform globally for that component, but this can be disabled by setting global
to false:
Native functions
The nativewind/theme
export has been removed. You can now access these functions as CSS functions.
platformColor
platformColor()
is available as a CSS function:
hairlineWidth
hairlineWidth()
is available as a CSS function:
pixelRatio
pixelRatio()
is available as a CSS function:
fontScale
fontScale()
is available as a CSS function:
getPixelSizeForLayoutSize
getPixelSizeForLayoutSize()
is available as a CSS function:
roundToNearestPixel
roundToNearestPixel()
is available as a CSS function:
platformSelect
Now use a media query that sets the platform as the media type:
pixelRatioSelect
/ fontScaleSelect
Now use a media query:
New CSS Features
Nativewind v5 adds support for the new React Native styling features: