Skip to main content

Feature Comparison

⚠️ Via NativeWind means the library works with React Native only when combined with NativeWind or Uniwind, since they generate class strings that need to be converted to StyleSheet objects.

What Makes better-styled Different

Context Propagation

This is the killer feature. No other library does this.
Children know their parent’s variants automatically. Change the parent, children adapt.

Function Composition

Event handlers from base, variants, and direct props all execute - nothing gets overwritten.
This is perfect for design system features like haptics, sound effects, or analytics.

React Native: Components vs Class Strings

All variant libraries work with React Native when combined with NativeWind or Uniwind. The difference is in what they output:

Detailed Comparisons

vs Tailwind Variants

Tailwind Variants is excellent for styling, but it’s not a component library. When to use Tailwind Variants: If you only need class generation without component abstraction. When to use better-styled: If you want actual React components with context propagation.

vs CVA (Class Variance Authority)

CVA is minimal and focused on class generation. When to use CVA: If you need the smallest possible bundle and only need class strings. When to use better-styled: If you want context propagation, compound components, or cleaner React Native DX.

vs Windstitch

Windstitch is a lightweight Stitches-like library for Tailwind. When to use Windstitch: If you want a Stitches-like API with minimal footprint and don’t need compound variants. When to use better-styled: If you need context propagation, compound variants, or cleaner React Native DX.

vs classnames

classnames is a simple utility for conditionally joining class names. When to use classnames: If you only need to conditionally join class names without a variant system. When to use better-styled: If you want a proper variant system with type safety and context propagation.

Migration Examples

From Tailwind Variants

From CVA

From classnames

Summary

Get Started

Ready to try better-styled?