What is the difference between a component and a variant in Figma?

What is the difference between a component and a variant in Figma?

Reading Time: 2 minutes

TL;DR: A component is a reusable master whose instances update when the master changes. Variants group related states of that component, such as default, hover and disabled, into one selectable set.

Components and variants solve different problems and are frequently conflated.

Step 1 Define what a component does

A component is a reusable master. You create it once, place instances throughout your file, and edits to the master propagate to every instance, which keeps a large product consistent.

Step 2 Use overrides for per-instance differences

Overrides let an instance differ in specific properties such as text content without breaking the link to the master. This is intended behaviour, not a defect.

Step 3 Recognise the explosion variants prevent

Without variants, a button might exist as six separate components for primary, secondary, hover, pressed, disabled and loading, cluttering the asset panel and making swaps tedious.

Step 4 Group states into one component set

With variants, those six live inside one set, and a user selects the desired state from dropdown properties in the right panel. The asset panel stays clean and swapping is fast.

Step 5 Enable smarter prototyping

Interactive components can transition between variants on hover or press without wiring separate frames, which makes realistic prototypes far easier to assemble.

Step 6 Adopt a disciplined naming structure

Use consistent property names such as type, size and state with predictable values, so anyone on the team can find the right combination without guessing.

Step 7 Avoid two common mistakes

Do not use variants for genuinely different components such as a button versus a tag, because the set becomes unmaintainable. And do not nest variants so deeply that instances become fragile and slow.

Step 8 Treat detaching as a last resort

Detaching an instance breaks its connection to the master permanently. Use swap instance when you want to change which component an instance points to, rather than detaching to force a structural edit.

Back to How-To

Was this helpful?

Thanks for your feedback!

Comments are closed