API Reference
cva
Builds a cva
component
Parameters
options
base
: the base class name (string
,string[]
or otherclsx
value)variants
: your variants schemacompoundVariants
: variants based on a combination of previously defined variantsdefaultVariants
: set default values for previously defined variants.
Returns
A cva
component function
cx
Concatenates class names (an alias of clsx
)
Parameters
classes
: array of classes to be concatenated (seeclsx
usage)
Returns
string
compose
Shallow merges any number of cva
components into a single component.
Parameters
options
: array of cva
components
Returns
A cva
component function
defineConfig
Generate cva
, cx
and compose
functions based on your preferred configuration.
Store in a cva.config.ts
file, and import across your project.
options
hooks
onComplete
: returns a concatenated class string of all classes passed tocx
,cva
orcompose
.