Skip to main content

Overview

Uniwind provides two powerful tools for styling third-party components that don’t natively support className props. Wrap third-party components to add className support using withUniwind:
Best for: Components you use frequently throughout your app. Wrap them once, use them everywhere with className support.

withUniwind Documentation

Learn how to wrap components and map custom props

Option 2: useResolveClassNames

Convert className strings to style objects at runtime:
Best for: One-off usage or components with complex style requirements that can’t be easily wrapped.

useResolveClassNames Documentation

Learn how to convert classNames to style objects

Quick Comparison

FeaturewithUniwinduseResolveClassNames
SetupOnce per componentPer usage
PerformanceOptimizedSlightly slower
Best forReusable componentsOne-off cases
SyntaxclassName="..."style={...}

Example: react-native-paper

Example: react-navigation

For most third-party components, withUniwind is the recommended approach as it provides better performance and cleaner syntax.