I’m trying to do something rather complex and about 90% sure it isn’t possible with the current autolayout options.
I have this modal design. The background is a rather unique shape. I want the background to adjust when the internal container (dashed for demo) changes in size. I’ve set that as a slot that I can replace with different content.
The interior section will need to be adjustable, but the spacing is 48,8,8,8. The modal
Best answer by ntfromchicago
Here’s a proof of concept that I think covers your use case:
The main technique is hacky but I’ve used in production; it’s basically a fixed zero-height background anchored to the top right corner (with clip content turned off). The actual background is a component large enough to accommodate the widest size of your modal. (In theory, you could use an image for this background but it is not performant as an SVG).
The main technique is hacky but I’ve used in production; it’s basically a fixed zero-height background anchored to the top right corner (with clip content turned off). The actual background is a component large enough to accommodate the widest size of your modal. (In theory, you could use an image for this background but it is not performant as an SVG).
Thanks @ntfromchicago for the help. The directions definitely solved my issue. It is hacky, but it’ll work for my master component. I was also able to put my header content in that top frame. So bonus!
A
Anonymous
0 replies
January 28, 2022
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.