Class Variance Authority
Type-safe CSS class composition for component variants and styling.
UI components and icons npm Apache-2.0
Used in agent projects
1,791
14.1% of 12,697 public repos built with AI coding agents
Rank in ui components and icons
#2 of 75
by use in those projects
Downloads
66.3M
npm, last 7 days, class-variance-authority
GitHub stars
6,903
last push Oct 6, 2026
How Class Variance Authority is used
Class Variance Authority is a dependency in 1,791 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (14.1%), #2 of 75 in ui components and icons. The most used alternative there is Lucide React. Projects that use it most often also use Tailwind Merge (98.8%), clsx (98.3%), Lucide React (94.0%). It is more common in projects set up for Roo Code (30.1%) than for GitHub Copilot (15.2%).
Often used with Class Variance Authority
| Tailwind Merge | 98.8% of Class Variance Authority projects · 5.9× more than average |
|---|---|
| clsx | 98.3% of Class Variance Authority projects · 5.5× more than average |
| Lucide React | 94.0% of Class Variance Authority projects · 4.7× more than average |
| Radix UI | 80.5% of Class Variance Authority projects · 6.7× more than average |
| Tailwind CSS | 99.3% of Class Variance Authority projects · 2.9× more than average |
| next-themes | 55.8% of Class Variance Authority projects · 6.4× more than average |
| Zod | 61.0% of Class Variance Authority projects · 3.6× more than average |
| React | 97.4% of Class Variance Authority projects · 2.2× more than average |
By coding agent
| Claude Code | 16.6% of projects set up for it |
|---|---|
| Cursor | 21.7% of projects set up for it |
| GitHub Copilot | 15.2% of projects set up for it |
| Gemini CLI | 18.0% of projects set up for it |
| OpenAI Codex | 15.8% of projects set up for it |
| Devin Desktop | 20.8% of projects set up for it |
| OpenCode | 16.2% of projects set up for it |
| Roo Code | 30.1% of projects set up for it |
Share of public repos configured for each agent that list Class Variance Authority as a dependency.
Install
| Package | npm install class-variance-authority |
|---|---|
| Main stacks | Next.js (1,195), TypeScript / JavaScript (499), PHP (59), Python (23) |
| Example projects | ding113/claude-code-hub, veithly/BountyBoard, trypostit/trypost, miantiao-me/bm.md, kovrichard/catalyst |
Alternatives to Class Variance Authority
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| Lucide React npm Comprehensive icon library with consistent design for React applications. |
2,519 (19.8%) | 108M | 24.9K | ISC |
| Radix UI npm Unstyled, accessible component primitives for building design systems. |
1,519 (12.0%) | 182M | 19.4K | MIT |
| Sonner npm Opinionated toast notification component for React applications. |
1,025 (8.1%) | 49.6M | 13K | MIT |
| React Icons npm Popular icon packs imported as React components with ES6. |
688 (5.4%) | 8.8M | 12.7K | MIT |
| cmdk npm Command menu component library for React applications. |
687 (5.4%) | 42.2M | 13K | MIT |
| React Day Picker npm Flexible and customizable date picker component for React. |
675 (5.3%) | 42.8M | 6,859 | MIT |
| Vaul npm Unstyled, accessible drawer component for React with smooth animations. |
582 (4.6%) | 35M | 8,638 | MIT |
| react-resizable-panels npm Resizable panel layout component for React with keyboard and touch support. |
545 (4.3%) | 32M | 5,395 | MIT |