Skip to main content
Question

Remebering props

  • May 13, 2025
  • 6 replies
  • 43 views

Jens_Van_den_Nieuwenhuysen1

Context:

I’m working on a configuration for commonly used storyblocks in our design system. I’m encountering an issue with maintaining overrides when switching between variants.

  • Top-right: This is the starting point — a "text on image" component where the title and label fields are filled in with custom content.

  • Bottom-right: Here, the "text on image" component is instance-swapped with another component. The custom title and label values are preserved during the swap — which is the desired behavior.

  • Left: This shows what happens when the swap is done using variants within the component. I created a new variant based on the original "text on image" component and did the instance swap inside the component itself. However, in this case, the custom title and label are lost when switching variants.

So even though I’m performing essentially the same swap — just inside the component using variants — the result is different, and the overrides are not retained.

Question:
Does anyone have tips or best practices for maintaining overrides when switching variants within components?

6 replies

sedatcakir
  • Active Member
  • 26 replies
  • May 13, 2025

Hi Jens,
Could there be a collision in your component setup? If you wish, share the file so we can take a look together.


Jens_Van_den_Nieuwenhuysen1

@sedatcakir I also tried with the most basic component. Frame with title prop, which also doesn’t work.

 


sedatcakir
  • Active Member
  • 26 replies
  • May 13, 2025

Then if i understand correctly.

The layer you want to change has a double fill. this is also crushed in the override. can you try to place the gradient on a different layer to prevent this?


Jens_Van_den_Nieuwenhuysen1

It’s basically another component which shares the same properties like title content and label. When instances swapped outside of the variant, it works fine. Yet when the “storyblock” or “section” is swapped, the content of the props isn’t connected.


sedatcakir
  • Active Member
  • 26 replies
  • May 14, 2025

Hello again,

Can I look at your file?


Jens_Van_den_Nieuwenhuysen1

Here is the simplified version