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.');
}