Skip to main content

How to

Component Variance Authority πŸŠβ€‹

The CVA plugin automatically generates variants for your components. Variants are generated and named according to a set of rules. Understanding these rules is essential to use the plugin to its full power and ensure no time is wasted.

How to use CVA​

  • πŸ₯³ Install it from figma logoFigma Community
  • πŸ” Create a component using other components (Cascading Components)
  • πŸͺ„ Run CVA and click β€œGenerate!”

Cascading components​

To take the most out of CVA, designers must create their components by combining subcomponents. That style is called Cascading Components and is explained at length in the article below.

Subcomponents

For simplicity, we'll call "instances of components used inside your component" simply β€œsubcomponents”.

Rule of Thumb

Break down what varies in your component into other components and them as subcomponents.