
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?