Does the Sketch app provide something like a "resize artboard to content" command? If yes, where can I find it?
This question has not been accepted and I think what OP were looking for is resize the artboard to fit to the content with it, and thus it got no answer so far.
While I don't know when this feature had been available, but in Sketch 3.7, you can achieve it exactly. Just select the artboard and on the Inspector, click on the
Resize to Fit. Sketch automatically resize the artboard to fit to the content.
- Select the content around which you want to make an artboard.
- Click on the artboard button (or) go to Insert → Artboard.
- On the right you will see various artboard sizes. The top one will be called "around selection".
FYI, my suggestion is an extension to Jagrat Jagz Desai's method. It's not fully automated but does save you the step of checking the size of your content in order to create an artboard at that exact size.
- in the Layers List on screen left, select the artboard that corresponds to your content
- delete artboard and hit 'Keep Layers' button when prompted
- highlight content, then insert new artboard (A)
- select 'Around Selection' option in the Inspector on screen right
Click the art-board layer on the left, there in the right panel you will see the size of an art-board, just readjust according to your need.
Having not previously found a good solution to this problem, I went and built a plugin to do just that.
Summary of features
- Hitting Ctrl+Shift+Z resizes the parent artboard of your currently selected layer. You can also resize one or more selected artboards (or the parent artboards of one or more selected child layers) all at once.
- Resize all the artboards on the current page with Cmd+Ctrl+Shift+Z. However, if you have a very large Sketch file with tons of artboards on the page, I'm not sure what kind of performance impact that'll have.
- The relative positioning of all layers on the artboard is always preserved
- The positioning of the artboard's layers with respect to the artboard's top-left corner will only consider visible layers. That means if a hidden layer is sticking out to the left of the visible layers, when you resize the artboard it will stick out the left side of the artboard's X axis.
- The artboard itself is never moved relative to other artboards on the page
Let me know (preferably on Github) if you have any comments or feedback!
Use 'Edit → Scale' command to resize artboards.
protected by DᴀʀᴛʜVᴀᴅᴇʀ♦ Aug 13 '16 at 16:01
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?