Mastering Group Resizing Feature in Sketch
From basic to advanced techniques to design responsively.
Update: my new article about this topic:
I was preparing a concept design for Sketch app to demonstrate my feature ideas. I used the beta version of Sketch (3.9) for that to try the new features and also to test my plugins to see if they are working still.
After a while, I realized that the new feature called “group resizing” is really simple but yet powerful if you use it right.
Of course, this simplicity comes with limited functionality compared to alternative layout systems like auto-layout. But still, until it’s improved or switched to something else, it will serve well I believe.
It’s really easy to setup group resizing feature in a group. Select a layer or multiple layers inside the group and choose the appropriate resizing option, that’s it. You will understand it better in the examples later in the article if it seemed a little complicated.
Currently We Have Four Resizing Options
This Feature can be Used in Shape Groups too! Yaaay!
Real-Life Examples and Techniques
As you can see, the basics are simple, but building more advanced layouts sometimes requires using hidden helper layers, shape groups or masking. I will explain each of these in the examples below.
Also I should mention that group nesting is supported, you can nest as many as you want. Right now it has one downside: when you resize a group, the layers in descendant groups might get floating numbers in their position, although the direct children won’t get floating numbers — only if the setting “pixel-fit when aligning layers” is enabled, otherwise in both situations you might get floating numbers. I think it would be good to have a setting for that in the future.
Let’s look at the examples to learn more details:
1. Chat UI Elements
1.1. The Text Message View
The option “resize object” might work differently depending on how many edges of the object is intersecting with the bounds of the group. Actually, except the third case below, it works like expected.
It might be a bug or the natural dynamic of the implementation. In any case, for now we can find some workarounds to make it work, here one of them:
A Tip for Changing the Height
1.2. The Voice Message View
Resizing the mask manually is the best solution I could come up with for now. I experimented a lot on resizing the mask automatically by using resizing features; but when the mask content is bigger than the group size, it pushes the content to stretch into the group size by squeezing it, so I think it’s not possible to do this yet.
1.3. The Photo Message View
1.4. The Input View
2. Sketch Color Picker
The Panel and Background Layer
The background layer of the panel is a shape group that uses group resizing features. We need to use boolean operations to make it responsive. If you just unite a triangle and a rounded rectangle, it doesn’t work because of the same reason in “3 edges” example of the text message view.
3. Sketch User Interface
The Main Structure
As you can see, the main structure is really simple. No need to go through the smaller elements, most of them are easy to figure out after seeing all these examples. Also some of them are just not possible to be designed responsively because of the current limitations.
Clearly the new feature makes resizing groups way easier than before, and so designing too. But its being so simple limits the things you can accomplish. In a world that everything needs to be designed responsively we need more complex features surely. Still it’s good to see that we’re one step closer to that! Thanks for reading!