const design = await openDesignSdk.importDesignFile('/tmp/file.sketch')
const designContents = design.getContents()
const textLayers = await designContents.findTextLayers()
const texts = textLayers.map(({ artboardId, layer }) => {
return {
artboardId,
layerId: layer.id,
text: layer.getTextValue()
}
})
Node.js SDK with batteries included.
Just add Open Design SDK as a dependency in your project and you have everything you need to start getting data from design files.
In just a few lines of code, you can extract all the text from a design. It’s that easy.
Get started with the SDK