Skip to content

API Reference

Builds a cva component

const component = cva("base", options);
  1. base: the base class name (string, string[] or other clsx value)
  2. options (optional)
    • variants: your variants schema
    • compoundVariants: variants based on a combination of previously defined variants
    • defaultVariants: set default values for previously defined variants
      note: these default values can be removed completely by setting the variant as null

A cva component function

Concatenates class names (an alias of clsx)

const className = cx(classes);

string