Any tips to set a max width on a nested symbol?

Hi everyone! I have a symbol that is part of a table cell. The table cell can stretch to be quite long, but I want this nested symbol to have a max width, so if the table cell is 1,000px wide, the nested symbol will only reach 400px wide.

It doesn’t have to be exact, but I just want it so that the nested symbol doesn’t stretch out really far.

Does anyone have any tricks (like invisible spacer symbols, or something else) to aid with this? Thanks!

Below is an example of what I’m trying to do. The top image shows the symbol as it works now. The nested symbol (More information) is pinned to the left and right of the symbol, which works great on smaller screens. On a larger screen I want it to max-out at a certain point (see bottom image).

I’m not a 100% certain this can be done, but I’d love to give it a go. Would you mind sharing a sample Document so we can try out luck?

I’m also going to tag our Smart Layout expert @dfmedrano to see if he has any ideas as well! :pray:

1 Like

Sure! I’ve attached a doc
max-width-smart-layout.sketch (806.2 KB)

I tried using a transparent symbol to the right of the More info symbol, then grouped them together and had the group pinned to the left and right of the parent symbol. It kind of worked, but didn’t give enough space when I stretched the parent symbol out.

I wonder if maybe the key is to make the parent symbol really wide, and the transparent spacer symbol take up about the amount of space I’d like at that wide screen, then if I shrink the parent symbol down, the spacer symbol will shrink to be “roughly” what I’d like it to be. I can try that too.

Hey, thanks for sharing your document @jkilp and thanks for the ping @raulrincon :raised_hands:

I’m still trying different things but one way that could work is creating a separate symbol for the max size you want.

It’d be almost a clone of the 1.default accordion symbol, the difference is that this new symbol will have a fixed width, so when you reach the max size or stretch the parent symbol past that mark you can swap the default accordion symbol for the fixed width one.

I’ll keep testing this case but I wanted to share this idea

1 Like