How to export sliced assets with trim and transparency in Sketch

Apple's iOS Human Interface Guidelines recommend a minimum touch area of 44px by 44px. Based on this requirement, your smaller Sketch assets will need some extra trim when exporting. If your exporting from a Sketch Artboard you'll want to remove any background layers so your asset has a transparent background. Sketch's slice tool works extremely well for this when used correctly. I used this solution a lot in my Snoosic app and Time Void game for iOS.

First, once you are ready to export your asset, you need to create a slice and add the correct amount of trim.

Third, with your slice selected, check the Export Group Contents Only in the right inspector panel. Proceed with the usual 1x, 2x and 3x png export at the bottom of the inspector panel.

Sign up for our newsletter!