{"schemaVersion":1,"id":"cva","name":"CVA","locale":"en","canonicalUrl":"https://base.akulich.dev/en/library/cva/","officialUrl":"https://github.com/joe-bell/cva","isCatalog":false,"description":"Class Variance Authority: it defines component variants and maps prop combinations to CSS classes and TypeScript types.","tasks":["Define typed UI component variants","Connect prop combinations to class rules and test compound variants"],"categoryIds":["frontend","design"],"subcategoryIds":["frontend.components","design.systems"],"tags":["CVA","UI","Development"],"aliases":["joe-bell/cva","class-variance-authority","cva"],"platforms":[],"stack":[],"compatibility":null,"pricing":"free","freeUsage":"Code and local use under Apache-2.0.","paidUsage":"Computing resources, self-hosting, and external services are paid for separately if used.","license":"Apache-2.0 for the code; third-party components retain their own terms.","selectionGuide":{"purpose":"Define typed UI component variants","chooseWhen":["Define typed UI component variants","Connect prop combinations to class rules and test compound variants"],"considerInstead":[],"requirements":["The application defines classes and CSS; CVA does not provide a standalone visual component library."],"limitations":["Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.","Terms of use: Apache-2.0 for the code; third-party components retain their own terms."],"faq":[{"question":"What can you use for free in CVA?","answer":"Code and local use under Apache-2.0."},{"question":"What additional costs might arise with CVA?","answer":"Computing resources, self-hosting, and external services are paid for separately if used."},{"question":"What terms of use matter for CVA?","answer":"Apache-2.0 for the code; third-party components retain their own terms."},{"question":"How do you get started with CVA?","answer":"Identify component size, appearance, and state variants. Connect prop combinations to class rules and test compound variants. Configure styles and check empty, loading, and error states."},{"question":"What are compoundVariants and defaultVariants for?","answer":"CVA assembles classes from variants, including booleans. defaultVariants defines defaults; compoundVariants adds classes for combined conditions. Tailwind is optional. The documentation recommends SSR/SSG for static components to avoid sending unnecessary JavaScript to browsers."}],"related":[],"sources":["https://github.com/joe-bell/cva","https://raw.githubusercontent.com/joe-bell/cva/HEAD/README.md","https://raw.githubusercontent.com/joe-bell/cva/HEAD/LICENSE","https://www.open-source-tools.com/","https://cva.style/getting-started/variants/"]},"selectionCheckedAt":null,"applicationGuide":{"goal":"Define typed UI component variants.","inputs":["The component's design, states, and data.","A compatible framework and the project's styles."],"steps":["Identify component size, appearance, and state variants.","Connect prop combinations to class rules and test compound variants.","Configure styles and check empty, loading, and error states."],"checks":["The keyboard, focus indicators, and a screen reader let users complete the action.","The component works on a narrow screen and with long data values."]},"sources":["https://github.com/joe-bell/cva","https://raw.githubusercontent.com/joe-bell/cva/HEAD/README.md","https://raw.githubusercontent.com/joe-bell/cva/HEAD/LICENSE","https://www.open-source-tools.com/","https://cva.style/getting-started/variants/"],"checkedAt":"2026-10-06","reviewScope":"The purpose, current repository license, and separate terms for code, services, and models have been reviewed. The product was not run, and no security audit was performed.","relatedIds":[],"dataVersion":"cbbe7123b47a5ae80983","type":"UI library","kind":"library","pricingNote":"Code and local use under Apache-2.0. Computing resources, self-hosting, and external services are paid for separately if used.","notes":null,"labeledSources":[{"url":"https://github.com/joe-bell/cva","label":"Official source"},{"url":"https://raw.githubusercontent.com/joe-bell/cva/HEAD/README.md","label":"Official source"},{"url":"https://raw.githubusercontent.com/joe-bell/cva/HEAD/LICENSE","label":"License"},{"url":"https://www.open-source-tools.com/","label":"Catalog / discovery source"},{"url":"https://cva.style/getting-started/variants/","label":"Official source"}],"licenseGuides":[{"id":"apache-2","title":"Apache 2.0 — permissive license with patent terms","scope":null,"summary":"You can use and modify the code in commercial and closed-source projects. When distributing it, retain the license and relevant notices, identify modified files, and include NOTICE if provided. Authors grant a limited patent license for their contributions; it does not grant permission to use trademarks.","url":"https://www.apache.org/licenses/LICENSE-2.0"}],"entryIds":[],"composition":null}