Add padding to artboard (WIP)
✓ Published0🌍 Public
KKevinGutowski
Last edited Feb 10, 2020
Created on Feb 10, 2020
This plugin demonstrates how to adjust an artboard's dimensions and reposition its contents with a user-defined padding value. It uses the Sketch JavaScript API, including `doc.selectedLayers`, `Rectangle`, and `UI.getInputFromUser`, to prompt for input and modify layer frames. The script shifts the artboard’s frame outward by the padding amount while moving all nested layers inward by the same value, preserving their relative positions. It relies on `selection.frame` and `layer.frame` properties to apply geometric transformations.
AI-generated description