FindSoftware

cva

A TypeScript library for building type-safe, variant-driven class names with Tailwind CSS or any other styling approach.

cva is a TypeScript library for building class name strings from variant definitions. A component declares its base classes and its variants, and the library returns the class string for the values passed in, with those values typed. It works with Tailwind CSS or any other styling approach. The package installs from npm under the name class-variance-authority, because the shorter name had been registered as a placeholder before the project published; the installation page says the shorter name will be used from the next major version on. Joe Bell, named as the author in the package’s manifest and the README license line, maintains it.

Worth knowing

The next major line is in beta. By default cva joins class names but does not resolve conflicting Tailwind CSS utilities, so the installation page lists approaches for style conflicts.

Identity

Status
Active
Maintainer
Joe Bell4
Maintained by
Individual5
First release
20228

Rendering and deploy

Install with
npm3

Releases

Current major version
Pre-1.07
Last release
2024-11-267

Adoption

GitHub stars
6,9072
npm downloads a week
83,559,47410
Contributors
309
Dependent repositories
12,84011
Dependent packages
71011

Why these figures do not compare

Sources

  1. 2026-10-26: links, Categories
    cva.style/
  2. 2026-10-26: links, Written in, License, License model, GitHub stars
    github.com/joe-bell/cva
  3. 2026-10-26: links, Install with
    cva.style/getting-started/installation
  4. 2026-10-26: Maintainer
    github.com/joe-bell/cva/blob/main/packages/class-variance-authority/package.json
  5. 2026-10-26: Maintained by
    api.github.com/users/joe-bell
  6. 2026-10-26: License
    github.com/joe-bell/cva/blob/main/README.md
  7. 2026-10-26: Current major version, Last release
    api.github.com/repos/joe-bell/cva/releases/latest
  8. 2026-10-26: First release
    registry.npmjs.org/class-variance-authority
  9. 2026-10-26: Contributors
    api.github.com/repos/joe-bell/cva/contributors?per_page=1
  10. 2026-10-28: npm downloads a week
    api.npmjs.org/downloads/range/2026-09-28:2026-10-04/class-variance-authority
  11. 2026-10-26: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/class-variance-authority

Last reviewed · Updated · Listed since Edit on GitHubThis page as markdownas JSON