Design API
kittl.design gives you access to editor design operations. In the app sandbox, all calls are async.
API groups
The design namespace is organized by capability:
board- create and update artboardstext- add and update text objectsshape- create/update predefined or basic shapesimage/illustration/video/videoboard- media object workflowsobject- generic object utilities (remove, lock, hide, rotate, rename, get)layers/group- stacking and grouping operationscanvas- previews and exportsconfig/state/texture/guide/loadingCard- specialized editor state APIs
Example: create and select text
const addResult = await kittl.design.text.addText({
text: 'Launch campaign',
position: { absolute: { left: 140, top: 120 } },
size: { width: 360, height: 80 },
textProperties: {
fontSize: 48,
fill: '#111111',
textAlign: 'left',
},
});
if (addResult.isOk) {
await kittl.state.setSelectedObjectsIds([addResult.result.id]);
}
Example: artboard + shape workflow
const boardResult = await kittl.design.board.createStandardBoard({
title: 'Social post',
position: { absolute: { left: 100, top: 100 } },
size: { width: 1080, height: 1080 },
});
if (boardResult.isOk) {
const board = boardResult.result;
await kittl.design.shape.createPredefinedShape({
shapeType: 'rectangle',
position: { relative: { to: board.id, location: 'center' } },
size: { width: 920, height: 920, applyViewportScale: false },
objectProperties: { fillColor: '#f4f4f4' },
});
}
Notes
- All design API methods return
SdkResult; checkisOkand useresultbefore accessing values. - Use object IDs returned by SDK methods to chain operations safely.
- Prefer feature-specific namespaces (
text,shape,board) over generic object methods when possible.