Last updated on February 21, 2026
cssInterop & remapProps
These functions enable className support on components that don't natively handle it. They are primarily used for third-party components.
For your own components, you don't need these functions. Simply accept and pass through className. See Writing Custom Components.
cssInterop
cssInterop tags a component so the Nativewind runtime resolves className strings into styles. Use it when a third-party component accepts a style prop but doesn't pass through className.
Mapping to specific props
Some components use props other than style for styling:
With nativeStyleToProp, style properties are extracted from the resolved styles and passed as individual props. This is useful for components like SVGs that expect height/width as props on native.
Multiple className props
Components with multiple style props can accept multiple className props:
remapProps
remapProps is a simpler alternative to cssInterop for components that just need prop renaming:
Options: