API Reference
cva
Builds a cva
component
const component = cva("base", options);
Parameters
base
: the base class name (string
,string[]
or otherclsx
value (opens in a new tab))options
(optional)variants
: your variants schemacompoundVariants
: variants based on a combination of previously defined variantsdefaultVariants
: set default values for previously defined variants
note: these default values can be removed completely by setting the variant asnull
Returns
A cva
component function
cx
Concatenates class names (an alias of clsx
(opens in a new tab))
const className = cx(classes);
Parameters
classes
: array of classes to be concatenated (seeclsx
usage (opens in a new tab))
Returns
string