{"library":"cva","type":"library","category":null,"description":"Class Variance Authority (CVA) is a tiny, TypeScript-first utility library for defining and resolving UI component variants in a structured, type-safe manner. It allows developers to describe base classes and variant-specific classes, handling the runtime resolution based on provided props. CVA supports features like compound variants, default variants, and provides a `VariantProps` utility type for extracting TypeScript prop types. Currently, the stable package is `class-variance-authority`, with version 0.7.1 as of the latest npm publish over a year ago. While the `cva` package name exists, it's a placeholder, and the official project intends to use `cva` as the primary name from v1 onwards. It is framework-agnostic (works with React, Vue, Svelte, plain HTML) and CSS-agnostic (Tailwind CSS, CSS Modules, plain classes), making it highly flexible. Its small bundle size (approx. 1.6 KB minified + gzipped) and lack of runtime style injection are key differentiators against CSS-in-JS solutions, providing full control over stylesheet output.","language":"javascript","status":"active","version":"0.0.0","tags":["javascript","placeholder","zce"],"last_verified":"Wed May 27","install":[{"cmd":"npm install cva","imports":["import { cva } from 'class-variance-authority';","import { type VariantProps } from 'class-variance-authority';","const { cva } = require('class-variance-authority');"]},{"cmd":"yarn add cva","imports":[]},{"cmd":"pnpm add cva","imports":[]}],"homepage":"https://cva.style","github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/cva","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/cva/compatibility"}}