网页
综合
更新时间 2026-11-12 00:00:00
Importing & exporting · Sketch
自动蜘蛛
www.sketch.com
正文约 5999 字
Note: Images, videos and some instructions on this page may not be accurate. Please bear with us as we update the Docs for Sketch’s new UI.
With Sketch you can easily export presets, slices, export CSS and SVG code from any browser, and import other files.
The quickest way to import files into Sketch is to drag and drop them onto the dock icon or directly onto the Canvas. You can import:
If you’re importing an animated GIF or WebP image, Sketch will only import the first frame. Note that Sketch no longer supports EPS files since Apple dropped built-in support for PostScript files in macOS Sonoma — which includes EPS documents.
Open the Mac app and press ⇧⌘O or select File > Open from your Mac from the menu bar to open the Figma file (.fig) from Finder.
Alternatively, open Finder, find the Figma file you want to import, control-click it, and choose Open With > Sketch.
The Figma importer isn’t available in the Mac App Store version of Sketch. If you need to import .fig files, download Sketch directly from our releases page.
If another design tool uses a closed or proprietary format that Sketch can’t open directly, try exporting it from the original app to a supported format first, or use a trusted third-party converter before importing it into Sketch.
To export frames or assets in different sizes or formats (and allow others to export all assets from the web app at once), select them and click Make Exportable at the bottom of the Inspector. Then, press the Export Selected button.
Note: Developers can export individual layers without any set up in the Mac app.
Alternatively, choose File > Export > All Assets in the menu bar — or press ⇧⌘E to bring up the Export dialog. Select the items you want to export, then click Export to open the MacOS save dialog. This option will only export frames that are marked as exportable.
You can select which items to export before saving them to your Mac
Once Sketch has exported your assets, you’ll see an X Files successfully exported confirmation message at the bottom of the Canvas, where X is the number of created files. If you export just a single file, you’ll see its filename instead.
Click the arrow in the confirmation message to open the folder where your items were saved to.
To export one or more layers as PNGs, select and drag them from the Layer List to your desktop (remember to make them exportable via the Inspector first), or select your layers and press ⌘E.
You can quickly export a layer by dragging it to your desktop
You can copy any layer or frame and paste it directly into another app as an image. If the application you’re pasting into supports vector data, then your pasted layer will stay as a vector that you can safely scale up. If the app doesn’t support vector data, then Sketch will paste your layer at 2x the resolution.
You can copy and paste high-quality images directly from Sketch
To export layers as PDFs, select them in the Layer List, then press and hold ⌥ before dragging your layers.
To export a selection of (or all) frames as a PDF, choose File > Export > Export Frames to PDF and select your frames. You can then choose to include frames’ titles, render them as bitmaps or include frames’ comments (only Workspace documents). You can also export comments from Workspace documents in CSV format by heading to File > Export > Comments to CSV. To choose the order in which frames export, head to the Layers panel in Settings.
If you want to download assets and inspect designs from any browser, head to our developer handoff documentation.
Bitmap images are flattened versions of anything you export in the Mac app, so they’ll open in other apps as a single layer. Sketch can export to PNG, JPG, HEIC, TIFF and WebP.
Depending on the file format you choose, you may also see further export options:
Vector formats like SVG, PDF and EPS preserve paths, so they scale cleanly and are easy to edit after export. Use the Size dropdown in the Export panel to set the Canvas size, and adjust the scale when exporting SVG layers. Unlike bitmap formats, changing the scale won’t affect image quality — vectors look sharp at any size.
Some effects aren’t supported in all file formats, including transparent gradients in PDFs, and inner and outer borders in SVGs.
Choose File > Print and select the frames you want to print. If you don’t have any frames yet, you can print slices instead.
The Mac app exports everything as a PNG at its actual size (1x) by default, but you can assign different export settings from the Export Presets panel in the Inspector:
Image export options in the Inspector
Slices are a type of layer you can draw on your Canvas that will export anything within them as an image. You can select, resize, move, hide, and group slices just like other layers.
Choose Insert > Slice, or press E. Then, click and drag anywhere on your Canvas to draw a new slice or click on any layer to create a slice around it.
How to insert a slice
It’s worthwhile giving a slice a descriptive name in the Layer List because Sketch will use it as the file name for any exports you create. And if you include a / in its name, Sketch will use anything you write before it as a folder name, and anything after as a file name within that folder.
As with other layers, you can set multiple export presets for slices.
When you select a slice you’ll find a few additional options in the Inspector.
Checking Trim Transparent Pixels will remove any empty pixels around the edges of your slice’s content.
If you place a slice within a group, checking Export Group Contents Only will make sure that the export only includes content from within that slice’s group.
Finally, you can check Background Color and choose a color to apply a background color to your slice exports.
Select one or more layers in your document, then choose Edit > Copy > Copy CSS Attributes from the menu bar. Here’s an example of what a simple shape’s CSS looks like:
Copying SVG code works in a similar way. Select a shape layer, then
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。