Skip to main content
Pablo_Romero_Jaren
November 10, 2023
Question

Instance swap issue. Height set to fixed

  • November 10, 2023
  • 21 replies
  • 1669 views

I’m experiencing an issue with an instance swap property in Figma. I have a Card component with Auto-layout (width: fixed, and height: hug). It wraps an instance of a component associated with an instance swap property (width: fill and height: hug).
When I create an instance of Card and change the inner instance through the instance property it works fine the first time. From there, if I change it again, Figma sets the height of the inner instance to fixed. This crops the content.

Does anyone knows why this happens and how to fix it? Is it a bug in Figma?

File here: https://www.figma.com/file/eikqjwKX167uMlUeiGRUOM/instance-swap-issue?type=design&node-id=0%3A1&mode=design&t=4douRHhJOBFMc5Oa-1

This topic has been closed for replies.

21 replies

Gayani_S
Figmate
Community Support
November 10, 2023

Hey Pablo, thank you for reaching out with a screen recoding and a link to your file. This looks like a bug to me. I’ve created a support ticket on your behalf, so that our technical quality team can take a look at this. Your ticket number is #849291, for reference.

Fayemi_David
February 26, 2024

I keep having this same issue, @Gayani_S Has it been fixed?

Celine_
Figmate
Community Support
February 27, 2024

Hey @Fayemi_David ,
I am working closely with Gayani, happy to help!
After checking internally, unfortunately we cannot set an ETA yet for the fix for the instance swap issue at this time. Still, once we have an update I will let you know. Thank you for your patience in the meantime.

Aitor_Olavarria
New Member
June 13, 2024

I have the same issue with a different component: A side menu.
When I swap between a selected state - with sub-pages below - to any other state and then swap back to ‘selected’ the component’s height changes to fixed instead of its preset ‘hug’, cropping the content (sub-pages) below.
Any update about this 7 months later?

Jeroen2
Active Member
June 24, 2024

Same here. Instance swapping doesn’t seem to respect the intrinsic size of the component that is swapped to. If the sizing is set to “Fixed”, it holds on to the intrinsic size of the component instance that is defined as the instance inside the main component.

June 26, 2024

Any update on this topic? Like this there is no advantage of using instant swaps when the components have wrong sizings.

Ara_Garabedian
New Participant
June 28, 2024

I have this exact same issue and have no idea how to fix it.

Jahren
July 16, 2024

@Gayani_S I have a similar issue which is also happening when I swap a variant nested in my component also. The strange thing is, its is not consistent across the nested variations within the component.

I have a component with two mockups, their position and scale are the variations.
Inside the mockups are nested variations, allowing me to swap the mockup screens.
The bug seems to only happen with the mockup position which has had its scale adjusted in the final component.

Please see the video below, comparing the same component but the bug showing on the scaled down component.

I am hoping it has to do with the way I’ve built the component rather than a bug that has an undefined fix time as I am close to a deadline for a client!

Gayani_S
Figmate
Community Support
July 22, 2024

Hey @Jahren, apologies for the delayed response!
I’d also comment to double check this with the support team. I saw that you’ve filed a ticket with our support team (#1068249) but you have got any response yet. Please be aware that we are facing increased contact that’s why there is a delay.
I am going to escalate this internally with the teams, so you get help asap. Please also provide a direct link to the file, and invite support-share@figma.com with “can edit” permission so our team look into this further. Note that users with @figma.com emails on your team do not count towards your billing.

Thank you!

Savannah_Niemeyer
New Member
July 24, 2024

I am also having this issue. Just spent forever trying to figure out what I was doing wrong.