Component vs instance behaviour differences

Hello :wave:

I have an issue with inconsistent behaviour of a component and an instance. In this case it’s a dropdown tray which consists of rows that are instances of another component with multiple variants and the tray itself belongs to a variant group also.

The issue: As long as I duplicate row sub-component within the variants group, I’m getting the results I desire: pressing cmd+D duplicates the row and places it beneath the current row. This stops working as soon as I duplicate (alt+drag) the component and work on an instance. Then cmd+D duplicates the row but places it on top of existing one instead. What’s wrong with this workflow? Is there something wrong with this logic?

I wanted to attach a screen recording but as a newbie - I can’t :expressionless:

Advice much appreciated.

Only master components can be edited. Instances only allow overriding properties, such as colors, opacity, visibility, stroke width, autolayout constraints, border radius and text content. You can’t move things around within an instance, or add/remove content.

Instances are recognizable from their hollow diamond icon in the layers panel on the left and the instance swap menu in the properties panel on the right when selected.
Master components have four filled diamonds as icons, or a single filled diamond if it’s a component variant.

I hope this clears up any confusion.

Thank you @Klesus it makes sense. I didn’t assume the answer to my question is as simple as “you just can’t do that” :sweat:

So I guess since I cannot duplicate the rows within the instance, the work around could be to create a bunch of variants of the master component (i.e. containing 3, 4, 5… and more rows) and then just picking the right instance variant.

Any other solutions come to mind?

If that main component containing the rows is an auto layout component, you can also just create one of them with the maximum number of rows you need. And then in the instance you just show or hide the rows in the layers panel and the layout will adapt its size. Depends if you’re okay with a bunch of hidden layers cluttering your layers panel, but you wouldn’t have to make so many variants if you did it like this.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.