defaultVariants

A CVA option giving the variant values to use when the caller does not pass one.

In more detail

With defaultVariants: { intent: "primary", size: "sm" }, calling button() with no arguments still produces a complete, valid set of classes. They also make the component's normal appearance explicit in one place instead of implied by missing props.

Related terms

Taught in

References