As more and more design teams use Sketch to build UI interfaces, the big, shiny diamond has become a standard for many UI designers, liberating design productivity. Moreover, it plays an irreplaceable role in componentized design, responsive design, teamwork and style management.

Despite all the benefits of Sketch, there are many designers who use it in the traditional way of Photoshop and don’t take full advantage of the power of Sketch and simply use it as visual design software. In the usual UI work, when we encounter efficiency problems, we still use tedious operations to solve them, increasing the amount of tasks, and overtime has become the norm over time.

For example, the following music bar, 320px wide, is converted to a symbol component for reuse and named widget/Music/Player bar. But now there is a page that needs a 480px player bar, and when you stretch it directly, you will find that the component is broken.

If you make a 480px player bar component, it will feel repetitive: it looks the same, but the width is different, why can’t you just use the same component?

Sketch Resizing is such a feature. With its support, we can transform components with the same structure into flexible and responsive components to achieve efficiency improvement.

The music player bar above, for example, becomes elastic with Resizing, requiring only one component to achieve different widths.

In the old Days of Photoshop, stretching was a destructive operation, and when we encountered a component with the same style but different width, we had to create a new one, which resulted in style repetition. This is not a problem in front of the front-end, just change the width, the internal use of float, position and other properties can be used in response to the reuse of components. Resizing is what makes components responsive.

Resizing is introduced

Resizing, also known as intelligent scaling, can restrict the position and size of elements in a group or symbol, so as to realize the flexibility of components.

In the latest version 55, the Resizing interface has undergone three phases of transformation.

1- Initially there were only four attributes, representing stretch, fixed position, scale, and float. It takes a lot of practice to understand.

2- The next four attributes are broken up and divided into the upper, lower, left and right fixed on the left and the width and height fixed on the right, which can be freely matched by designers to improve flexibility.

3- Finally evolved to the current Pin to Edge +Fix Size mode. The change of title layout enlarged the space, increased the preview window, and made the whole more flexible and intuitive.

In fact, after the Chinese version of Sketch54 came with the Chinese version, Resizing was given an official Chinese name: Resizing, and two important attributes were explained in Chinese in a more intuitive way, making it easier for designers to understand.

For details on how to switch between English and Chinese versions of Sketch54 and later, see the article “Give me back my English Interface!

Resizing attribute analysis

Resizing is mainly used in the following collocations. In this example, the UI hacker logo is grouped with the background, and we modify the Resizing attribute of the logo within the group.

1- Select nothing, indicates normal stretching, and PS stretching effect is the same, but destructive nature.

Experience online prototype design of copycat

Experience immediately

2- The edge position is not fixed, and the width and height are fixed, indicating floating. The logo was intact, but not in the right place.

GIF

3- The edge position is fixed, and the width and height are not fixed, indicating the edge adsorption scaling. The spacing is right, but the logo is broken by stretching.

GIF

4- The edge is fixed in the upper left corner and the width and height are fixed, which means the logo is fixed in the upper left corner and the desired effect is achieved.

GIF

In addition, there are other combinations, which are based on the above four expansions, the operation is similar, but will form different effects in different interfaces.

For the logo example above, the structure is simple and there is only one element in the group. However, in practical design requirements, we are often faced with more complex text, pictures, shapes and other elements, which requires designers to practice through more examples.

Play bar layer analysis

Going back to the original playbar, it’s a fairly complex structure with both text and shapes. No matter how we stretch it, the content will be adapted according to the width. Of course, the Resizing function mentioned above is also used.

GIF

Before using Resizing to make complex elastic components, we should first sort out all the elements inside the components, so as to more accurately match the use position and width and height.

The player bar is mainly divided into three parts:

A- Left time and play buttons

B- Intermediate progress bar and B1

C- time on the right

What we want to achieve:

A- The spacing between the whole body and the left edge of the player bar is always fixed and the size remains the same

B- The distance between the whole and the left and right edges of the playback bar is fixed. The width of the gray progress bar will change, and the size of B1 remains unchanged

C- The spacing between the whole and the right edge of the player bar is always fixed, and the size remains the same

The layer structure of the entire play bar looks like this

GIF

Add Resizing to play bar

Next, start adding the Resizing attribute to the player bar.

For A and C, it’s easy, you just fix the size, and then you fix the left and right spacing.

A Resizing setting

C Resizing setting

So far we’ve set A and C, but we haven’t set B, so let’s see what it looks like.

GIF

You can see that A and C are very obedient, sticking to their positions and not changing their width and height as they are stretched.

Next we start the Resizing setting of B.

For B, the interior is divided into gray bars and B1. In the gray bar, we do not need to set any Settings for it, because the gray bar itself needs to be stretched based on B, so we need to set B1 well.

B1 needs to have the same size and position on the left, actually the same setting as A.

Next, let’s look at the stretching effect after setting A, C and B1.

GIF

We are almost done, but the position of B keeps changing. Finally, we need to keep the distance between the two ends of B and the edge of the player bar fixed. The width changes with stretching, so we need to fix the two ends.

After the above Settings, we finally have this flexible music player bar. Just one component can accommodate any width change, eliminating the need to duplicate components for different widths, reducing the workload and improving the maintainability of the document.

GIF

In our future UI design, we will encounter various components requiring adaptive width or height, which requires us to fully master and make use of the functions of Resizing, properly control the characteristics of each component, and truly improve efficiency.

Do design, use copy guest.

Original link: www.uihacker.com/sketch-resi…