1 مستودع
Utilities that create CSS class strings from typed variant definitions with zero runtime overhead.
Distinct from Class String Joiners: Distinct from Class String Joiners: generates class strings from variant definitions, not just concatenating fragments.
Explore 1 awesome GitHub repository matching user interface & experience · Variant-Based Class Generators. Refine with filters or upvote what's useful.
cva is a TypeScript utility for defining and resolving visual variants for UI components with full type safety. It generates CSS class strings from typed variant definitions, enabling compile-time validation of component usage by deriving the union of all variant prop types from a configuration object. The library distinguishes itself through compound variant matching, which activates styles only when multiple independent variant conditions are simultaneously satisfied, merging their class names. It also provides default value propagation to ensure consistent rendering when no explicit varian
Generates CSS class strings from typed variant definitions with zero runtime overhead.