Figma Support Forum

Why my variants are ignoring the override text properties?

Hello all,

-I have created variants for a Headline text component that I want to use in all my frames but need to be able to swap the content text depending on the needs (A/B testing for example).
-For this purpose, I created a component and made different variants.
-After, I used this component to create another component (named copy frame in the image below) that used the headline and subheadline components with auto layouts. That way I could use it on different size frames for different purposes.
-on the different instances I modify the text size of the headline so it fits for every size needs.
-once I copy that frame that has the text override and swap the property (say primary to secondary on the example) the text goes back to it’s original size, ignoring the text size override.

Why? how can I make it work?

I made an example of the same thing I’m trying to do.

I read this documentation but it seems my brain just can’t process.

Thank you all in advance.

It’s hard for me to see what’s going on without looking at the file, but do make sure that all your text layers share the same name (in the layers panel) across each variant. For example, the headline text layer in every variant should be renamed to something like “Headline Text” so that Figma knows to preserve the overrides on the matching layers when it switches out the variants. From your screenshot it looks like maybe the text layers are still using their default names.

ah! I thought it had to keep the same name for consistency, and just the properties be different . I will try that

Hi @Brian_Saunders

I tried with the subheadline having different names, Im pretty sure I’m doing something wrong, I can share the file with you