Change size of element in variant

Hello,

I’d like to change the size of the orange progress bar in a variant. unfortunately, this is only possible in the component itself (I kept a main component to fast change all variants just in case). This is the same when I create an instance of a component, it also won’t let me make changes to the size inside the instance.

I guess as soon as I keep a base component outside, the variant won’t any longer allow to change the size?

language app 2021-11-24 at 14.52.08

1 Like

It is possible to create an adjustible progress instance with a bit of autolayout hacking.

Not sure if my explanation will make sense but your layer hierarchy should look something like this:
Base Frame ← Master component
|-Autolayout Frame ← this is your progress bar
| |-Empty frame
| |-Empty frame

The autolayout frame should hug contents on the horizontal plane.
Since the progress bar is an autolayout frame with invisible children, only the progress bar will be seen. To adjust the length you change the autolayout spacing. This will even work on instances.

Hope this helps

Good luck.

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