Smart Layouts / How-to achieve multi-column & fully adaptable list?

Hello everyone, I spend maybe 2 hours trying to obtain a multi-columns lists symbol that works, without success.

What I need is this :

Any help will be greatly appreciated, it drives me crazy :upside_down_face:

Hey @Annie would you mind sharing with us:

  • A snippet or image of what you’re trying to achieve
  • Sample Document where we can check out your setup and see if we can help?

We currently have this initiative in which we want to provide some extra help to our customers working and relying on Smart Layout get those Components built and tested!

We’ll keep our :eyes: peeled!

Hi, here is a Sketch sample file as requested :slight_smile:
(I hope my english is ok, I speak french)

Adaptable list - Sample file.sketch (586.6 KB)

Thank you in advance!

Alright, first of all, thank you so much for sharing this sample Document with us. Even though it was a challenge at first. I feel like we got something really nice going for you!

Since Tables are meant to have very dynamic content, we feel like a Symbol would be too restrictive on this end, and with the new capabilities of Smart Layout to operate and work on Groups and Artboards, we definitely feel like this would be a better approach.

This will also enable you to do resize and adjust the table as you need!

On to the new table…

Let’s grab that initial cell Symbol and…

  • Make it so the Icon stays put to the left
  • The Text Element stretches if you stretch the Instance.
  • Let’s apply Smart Layout - Top to bottom, so the content is the one that defines the height of this Symbol!

Now, let’s build our Table!

  • Let’s insert some of these new Components we just built.
  • Using Smart Duplicate, create as many instances as you want.
  • Then Group all of these together (⌘G).
  • Now, select all the instances, and make sure they are pinned to the left and right (so they grow Horizontally when you manually resize)

When you’re happy with your initial setup, duplicate the Group to create as many Columns as you like. Then Group these too, and apply Smart Layout - Left to Right.

  • This helps with the Table always pushing and moving content as soon as you resize the Table cells width!

And voilá! The new setup enables you to:

  • Have the table using Smart Layout
  • Having the ability to define a specific width to any of the Colums.
  • Using the Size Instance to Fit Content option on the Inspector (or the Menu item under Layer > Size Instance to Fit Content, you can quickly adjust the table to match the content of your cell and have everything else react to these changes.
  • Here’s a quick video of the table in action!

Here’s the updated Document, let us know if this helps!

table-smartlayout-group.sketch (53.2 KB)

I’m also going to tag my colleague @dfmedrano who might have some other ideas on how to achieve this! :smirk:

3 Likes

Hey @Annie how’s it going?

Me and @raulrincon are super interested/curious to know how did it go with the setup Raúl shared. How did it go? Would you change something to it?

One thing I wanted to ask is why did you set your symbol’s source width to be larger than the list.

Let us know and and thanks for sharing this! :raised_hands:

Ohhhhh WOW WOW WOW WOW Thank you very much!
I’m out for the weekend so I will try monday and let you know for sure! :grinning: :+1:
Have a nice weekend!

2 Likes

Hi, I did the last Sketch update and I was able to see the new features in actions… It’s great and exactly what I needed to achieve this behavior!

Thank you so much for the help and detailed instructions, I really appreciate it!

I’m sure this dynamic table will be useful to a lot of users. Have a nice day :slight_smile:

3 Likes

Awesome!

We’re super happy to read this @Annie! We’re here to help anytime so if you have any other questions, ideas of feedback, by all means share them

Have a great day too! :raised_hands:

2 Likes