Sketch3: export a group and keep the size of the transparent background


I have a group with a transparent rectangle as the background, I'd like to export the group, make the exported png the same size as the background rectangle.

but sketch automatically trims my transparent pixels.

This is the layer hierarchy:

enter image description here

The Rectangle 6 is transparent and of size 50 * 50, the star 12 is in solid color and has a size of 32 * 32, I'd like to export this group as a 50 * 50 png.

I am using sketch version 3.2.2.

1/11/2018 3:13:00 AM

Accepted Answer

Got 2 answers for you...

  1. Select Rectangle 6 and click on make exportable, now click Create Separate Slice Layer (the little knife) and simply drag the shown image to your desktop to export it.

Answer 1

  1. (The better answer) Instead of using a transparent rectangle, create an Artboard. Hit A and drag a 50x50 box. Add your star, select the Artboard and click Make Exportable and finally drag the shown image to your desktop.

Answer 2

1/17/2015 4:10:00 PM