Mobile app version of vmapp.org
Login or Join
Hamaas979

: Why are slices in Sketch Important? I understand that this a noob question; I am about to import my Sketch design into Zeplin.io and I am being told that I should have slices created for

@Hamaas979

Posted in: #InterfaceDesign #Ios #SketchApp #Slices

I understand that this a noob question; I am about to import my Sketch design into Zeplin.io and I am being told that I should have slices created for my assets. I have created symbols for my icons that have a rounded pixel value for spacing. Why would I need to now create slices for the assets in my project?

I am told that I should create slices for an easy integration for development; but this seems a little redundant.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamaas979

2 Comments

Sorted by latest first Latest Oldest Best

 

@Samaraweera207

Slices are just another way to export in Sketch. You can just set a layer or group or artboard or symbol to export, but using slices give you more control over padding.

It’s also worth noting that slices export based on group hierarchy.

Here’s a situation where I chose to use a slice.



I could have just set the group to export, but by using a slice, it will always crop the exported image to the same size. This is important, because the group’s contents could change, which could change the group’s bounding box size. Short version: A slice maintains the export size. Exporting on a group does not.

I like slices in Sketch.

Additional info: When I said “slices export based on group hierarchy”, that’s mostly true. They will contain the layers that are their siblings and anything deeper. Their position within their siblings is ignored though. For example, if you have a group with a slice in it, it doesn’t matter if the slice is at the top of the group, or at the bottom. They’ll both export the same contents.

10% popularity Vote Up Vote Down


 

@Mendez620

You need to create slices to tell whatever software you're using what is an asset and what not.

Having a symbol doesn't necessarily mean it's an asset, a symbol could be anything from a product tile to a line of text. Your software can't magically tell what you think is an asset and what not, and exporting every layer is not only redundant but doesn't always lead to the needed result.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme