Skip to main content
Toby_Magrath1
December 11, 2023
Solved

Two different button types nested inside another component, button label overides are not carrying across variants, how can I make this work?

I have a “Contextual menu” component which has three variants. Each use a button type and a menu (list). One uses a primary-button (set to secondary), one uses a “ghost-button” the other an “icon-button”. My issue is if a designer adds their text label when the menu is set to default (primary-button) then switches to “ghost” the label is back to ghost-button’s default label.

The buttons are separate components but they on their own will carry label overrides between them but they don’t seem to be able to do it now that they are nested inside this new component. Is there a way to allow overrides to also be share here?

Below is the components and variant states and the button structure of the nested buttons insode the contextual menu.

This topic has been closed for replies.
tank666
tank666Solution
December 11, 2023

Your screenshot doesn’t show the component structure (layers), but it looks like there are layer mismatches somewhere. Try renaming the button instance.

But so that you can get an accurate answer, I suggest you share the link to the test file so that anyone in the community can check it.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank

2 replies

tank666
tank666Solution
December 11, 2023

Your screenshot doesn’t show the component structure (layers), but it looks like there are layer mismatches somewhere. Try renaming the button instance.

But so that you can get an accurate answer, I suggest you share the link to the test file so that anyone in the community can check it.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
Toby_Magrath1
December 11, 2023

Yes! that was the issue, stupid me didn’t remane the nested button layer to carry across all variants 🤦‍♂️. Was staring me right in the face. Thank you!!