If I set the example logo/image components’ frame to be an auto-layout with the contents framed/grouped inside, then the swap will change the size in the surrounding component instance. But that doesn’t seem like something that is really supported, known, and reliable from the Figma team.
In addition to the example, there are component type situations that I’d like Figma to be able to handle, which it currently doesn’t—without using the auto-layout trick.
These could be constructed in different ways which should all be supported:
Card component instance contains an instance of a logo. In an instance of the card, swapping one logo for another of a different size.
Card component instance contains an instance of a component of logos of different sizes as variants. In a card instance, changing logo variants.
Card component instance contains an instance of a component of logos as variants, which in turn have variants of different sizes. Changing the particular logo’s variants.
Yes, I just took a look at the file and I think I figured it out. When the nested component has overrides applied inside the surrounding component, swaps for that nested component will retain those overrides.
Your example appeared to have the chevron in there already reduced, so anything swapped into there with the hack would start out at its original size and get scaled down by the same amount.
To illustrate (thanks for making it editable):
I created another “small” chevron component
reset overrides in the placement in the Master
then selected the small chevron
then I made another child instance called “swapped” where in that instance I chose the original cheveron size
In that swapped instance the full size chevron is retaining its scale.
Or if I misunderstood your post and you want the opposite of the swapped components retaining their original scale, then apply the size override to the placement in the parent component. Then the swapped in components should resize by that amount, based on their original size.
That then doesn’t seem terribly different from the non-hack behavior of the swapped in component getting squished into the dimensions of the starting nested component (in the main component).
Thanks for looking at the file and providing instructions.
Correct to your 2nd response - I want the swapped component to get scaled.
For some reason it works in the Master component, but not an instance (duplicate of the master). I created a video of the issue in the child instance: