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() }
})
All the design data packed into JSON
Accessing design layers programmatically at scale or across formats seems impossible.
With Open Design, you can get all data from color styles to layout in a unified JSON-based format that we call Octopus via API.
How can you use it
- Sync design tokens
- Export text for translation
- Connect design data with code