# joe-bell/cva

Class Variance Authority

Repository: https://github.com/joe-bell/cva
Canonical: https://ross.abutalabs.com/products/cva
Homepage: https://cva.style
Language: TypeScript
License: Apache-2.0
License Family: permissive
Topics: css, classname, classnames, variants, cva, class-variance-authority
Last push: 2026-08-24T08:33:58+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 8, longevity 100
- inputs: {"age_days": 1704, "days_push": 9, "days_rel": 645, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6880, forks 136 (observed 2026-08-28T04:09:51.084034+00:00)

## What it is
Class Variance Authority (cva) is a tiny TypeScript library for building type-safe, variant-driven class names for UI components, with first-class Tailwind CSS support. It handles variant props, compound variants, and defaults so developers don't have to manually match classes to props.

## Use cases
- create type-safe component variants in react
- manage tailwind css button variants
- build a design system with variant-driven class names
- avoid manually mapping props to css classes
- extract variant prop types with typescript
- compose and extend styled ui components

## When to choose
- you use Tailwind CSS or write your own CSS and want type-safe variants
- you want a tiny, framework-agnostic alternative to CSS-in-TS libraries like Stitches
- you need compound variants and default variant values
- you want full control over your stylesheet output

## When to avoid
- you want responsive variants built in - cva doesn't support them
- you prefer a styled API or CSS-in-TS solution like Stitches or Vanilla Extract
- you need component composition handled for you out of the box

## Facets
- artifact type: library
- maturity: stable
- function: ui-components, css-framework, frontend-framework, type-system
- domain: frontend, web-development, web-design
- platform: bun, browser, cross-platform
- tags: tailwind-css, class-names, variants, typescript, design-systems, component-variants, nodejs, deno

## Member repositories
- joe-bell/cva (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:51.084034+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:41:40.302420+00:00, confidence not recorded.
  - readme: https://github.com/joe-bell/cva (fetched 2026-08-28T04:09:51.084034+00:00, sha 625ef490f54b)
  - homepage: https://cva.style (fetched 2026-08-29T08:37:56.135050+00:00, sha d8970a897f66)
  - site_page: https://cva.style/getting-started/installation (fetched 2026-08-29T08:37:56.137484+00:00, sha 6196d86a3e2b)
  - site_page: https://cva.style/getting-started/variants (fetched 2026-08-29T08:37:56.139288+00:00, sha efdfcac5cb61)
  - site_page: https://cva.style/getting-started/typescript (fetched 2026-08-29T08:37:56.141399+00:00, sha 02cb61d610d4)
  - site_page: https://cva.style/getting-started/extending-components (fetched 2026-08-29T08:37:56.143161+00:00, sha 17b9b83d823d)
  - site_page: https://cva.style/getting-started/composing-components (fetched 2026-08-29T08:37:56.144857+00:00, sha 36c84deaf8b0)
  - site_page: https://cva.style/faqs (fetched 2026-08-29T08:37:56.146912+00:00, sha ec8a5b4a4496)
  - site_page: https://cva.style/beta (fetched 2026-08-29T08:37:56.148770+00:00, sha bd82958eba2f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
