Documentation
Introduction

CVA Logo



Class Variance Authority

CSS-in-TS libraries such as Stitches (opens in a new tab) and Vanilla Extract (opens in a new tab) are fantastic options for building type-safe UI components; taking away all the worries of class names and StyleSheet composition.

…but CSS-in-TS (or CSS-in-JS) isn't for everyone.

You may need full control over your StyleSheet output. Your job might require you to use a framework such as Tailwind CSS. You might just prefer writing your own CSS.

Creating variants with the "traditional" CSS approach can become an arduous task; manually matching classes to props and manually adding types.

cva aims to take those pain points away, allowing you to focus on the more fun aspects of UI development.

Sponsors

A huge thank you to our sponsors for their ongoing support!

Want to support this project?
cva is a privately-maintained free open-source project.
Become a sponsor (opens in a new tab) to contribute towards development efforts financially.

Acknowledgements

Downloads

License

Apache-2.0 License (opens in a new tab) © Joe Bell (opens in a new tab)