Skip to main content

Adding Smartboards

Smartboards are dynamic artboards that automatically layout and adjust their content based on internal rules. You can use the kittl.design.smartboard namespace to add and update them.

Adding a Smartboard

To programmatically insert a new smartboard, you provide the position, sizing, and any layout-specific configuration.

const addResult = await kittl.design.smartboard.addSmartboard({
position: {
absolute: {
left: 100,
top: 100,
}
},
size: {
width: 500,
height: 500,
},
// Configuration properties will vary based on layout requirements
linkedBoardIds: ['board-id-123'] // Optional boards IDs of the boards you want to connect
});

if (addResult.isOk) {
console.log('Smartboard created:', addResult.result);
}

Once added, Kittl manages the internal constraints and resizing of the board dynamically.