Last updated on September 14, 2026

Migrating cssInterop and remapProps

Edit

Nativewind v5 RC0 does not export cssInterop or remapProps. Those APIs belong to the v4 documentation.

Use styled to create a wrapper for a component that needs className mapping, and render the returned wrapper:

import { styled } from "nativewind";
import { ThirdPartyView } from "third-party-library";
 
const StyledView = styled(ThirdPartyView, { className: "style" });
 
<StyledView className="bg-blue-500 p-4" />;

styled does not globally register or mutate the original component. There is no global option. Do not mechanically rename a v4 call and keep rendering the original component.

For wrappers that forward styles to another styled component, styled accepts { passThrough: true } as its third argument. This requires a compatible downstream consumer; it does not produce ordinary resolved styles for arbitrary third party code.

Review each prop destination, nested mapping and explicit prop precedence. Use nativeStyleMapping to extract styles into props; nativeStyleToProp is still a deprecated alias. See third party components and the v4 migration guide.