Skip to main content
Version: 0.0.8

Selected Artboards

Beyond selecting individual objects, you can also manage artboard selections. This is useful when your app performs actions that apply to entire boards rather than single items.

Getting Selected Artboards​

To retrieve the IDs of the currently selected artboards:

const result = await kittl.state.getSelectedArtboardIds();

if (result.isOk) {
console.log('Selected artboard IDs:', result.result);
}

Setting Selected Artboards​

To programmatically select one or more artboards, pass an array of artboard IDs to the setter:

const selectResult = await kittl.state.setSelectedArtboardIds(['artboard-id-1']);

if (selectResult.isOk) {
console.log('Artboard selection updated successfully.');
}

Objects Within Selected Artboards​

Use kittl.state.getSelectedArtboardsObjectIds() to read the object IDs within selected boards. kittl.state.setSelectedArtboardsObjectIds(ids) sets that selection, accepting string[]. Both calls are async and return SDK results.