TypeScript
Extracting Variant Types
cva
offers the VariantProps
helper to extract variant types
Required Variants
To keep the API small and unopinionated, cva
doesn’t offer a built-in solution for setting required variants.
Instead, we recommend using TypeScript’s Utility Types: