Programmatically change Sketch documents and Smart Layout features


I love the new Smart Layout feature :+1:
So far it works great within the Sketch app.

But I also manipulate Sketch documents programmatically, as described in the official repository:

Unfortunately the Smart Layout features aren’t triggered on changes within layers. For example if text changes:

It seems like a bug. Or is there a workaround to trigger Smart Layout after changes? I’m using JavaScript to change the document, then SketchTool to export the assets.


Hello @Tom,

:wave: Welcome to our community of Sketch enthusiasts! We’re delighted to have you join us and appreciate you taking the time to share your valuable insights.

Your keen observation about the Smart Layout feature not working when manipulating Sketch documents programmatically caught our attention.

We’re currently working closely with our engineering team to investigate this thoroughly and explore potential solutions that will help you to seamlessly use the Smart Layout feature. Rest assured, we’ll keep you updated on our progress.

In the meantime, we encourage you to delve into this insightful article that sheds light on the conceptual underpinnings of Smart Layout Beyond Symbols: Behind the feature: How we took Smart Layout beyond Symbols (Part 1) · Sketch

We’re thrilled to have you as a member of our community, Tom, and we’re eager to witness how you continue to use Sketch and the Smart Layout feature to elevate your creativity.

Cheers! :pray:

Hi Christiana,

Thank you!