[Released in Labs] Auto layout not only in symbols

Hi!

When creating a symbol we can tell each group how the elements should flow. Horizontal, vertical etc. However this is only in symbols. It would be awesome if this worked on regular groups/folders without symbols aswell. Maybe like in SwiftUI with Vstack, Hstack and Zstack!

Hey @Martin, welcome to the forum! You’re going to want to keep an eye on here next week. We might have something for you in relation to this. :wink:

11 Likes

@freddiewrites Can’t wait to see this :wink:

I’m very excited, Auto Layout for Artboards would be a game changer :heart:

8 Likes

I’d love for a way to set content to wrap to multiple lines responsively

1 Like

@nick I’m afraid that’s quite a bit further down the road, but we hear you.

Perhaps you already have that on the roadmap, but It’s interesting how PenPot is approaching auto layout. It would be amazing to have a mix in between actual auto layout and that.

@leohans What do you find particularly interesting about their approach?

Two things:

  1. It’s based on actual CSS flexbox
  2. It rearanges items when resizing, just like flexbox (adding/substracting rows as needed)
3 Likes

I could also suggest looking on Framer Stacks - they either act like Flexbox or Grid CSS. I know it’s different for Framer, because they are actually rendering into DOM instead of custom canvas. But it’s so easy to quickly build UI with this settings!
Знімок екрана 2023-03-02 о 12.44.20

3 Likes

Our philosophy with Smart Layout is purposely less rigid and more forgiving than Penpot / Framer / Figma, whose approaches are all strongly inspired by CSS’ flexbox (although not a 1:1 match). For example, Smart Layout naturally allows for uneven spacing, mixed alignment on the cross-axis, or even having ungrouped elements parallel to each other, without having to make extra containers just for those purposes.

Expect us to keep much of that flexibility unique to Smart Layout, but taking it a lot further step-by-step, reducing the amount of manual work to keep things as you expect them to be. It’s a long journey but we have ambitious plans.

5 Likes

@paulozoom I guess the main problem is that it’s not really clear (or it’s just me) how it behaves in each specific scenario. To be honest, that’s the main reason I had to switch to Figma. It’s not the implementation itself (though, having outer spacing in smart layouts would be great - like padding in CSS), but the way it presented in UI, so it’s clear what’s happening. It’s very confusing in current implementation, IMO.

2 Likes

Hey folks — for those of you who haven’t already seen, we’ve just released a new beta of the Mac app and an experimental feature which brings Smart Layout to regular groups :tada:

Our work on this is not done, but we wanted to share this feature while it’s still in development to get your feedback. You can find out more details of what it currently does, and what we still need to work on, in the Sketch Labs topic.

If you’re interested in trying out, you can head over to those two topics to find out more and share your feedback on what we’ve built so far.

7 Likes

Hey,
New here, considering moving back from Figma to Sketch. One thing I’d love to get would being able specify, let’s say, a smart layout made of 70% width zone and another zone for the remaining 30%, and that component would keep the space distribution whatever its width is.

Figma doesn’t do this, and this would be really really great.

2 Likes

@romu Figma can do this. Use the “Layout grid”.
I would like to see something similar in Sketch as well.

2 Likes

Interesting, I didn’t know and I just tried and it works really well!

It would be nice to create a special record to see how to do different combinations of objects, and how to make it faster without additional grouping.

@vitlayozza Cold you please clarify what you mean by “a special record”?

I looked through a lot of tutorials on Sketch and didn’t see a special video or article that showed all the ways to make different combinations: lists, grids, complex combinations of objects (for parallax). It would have been nice to see how to create a list of 5 elements with the same space between elements. All in all, this is very useful information for new teammates.

Have you got some articles or video tutorials about it in Sketch?

1 Like

@vitlayozza Ah, got you. Our Sketch 101 and Sketch 102 courses cover a lot of ground, but there’s nothing yet specific about taking advantage of features like Smart Layout and Smart Distribute (which, with Smart Layout in Groups, can work in tandem). Thanks for the suggestion!

1 Like