Skip to main content

Mockup Board API Reference

kittl.design.mockupboard — create and manage mockup boards.

Scope: design:state:write

addMockupBoard(params)

Creates a new mockup board linked to one or more source boards.

PropertyTypeRequiredDescription
inputBoardIdsstring[]YesIDs of the source boards whose content is warped through the template
mockupTemplateIdnumberYesMockup template to use
positionAbsolutePosition | RelativePositionYesBoard position
size{ width, height }YesBoard dimensions
shouldMockupColorMatchArtboardbooleanNoWhether the mockup fill matches the linked artboard's fill (default: true)
initialDesignsAddMockupDesignObjectParams[]NoDesign objects to create atomically with the board

addMockupDesignObject(params)

Adds a warped view of a source board's content to an existing mockup board.

PropertyTypeRequiredDescription
mockupBoardIdstringYesID of the mockup board to add to
inputBoardIdstringYesID of the source board to warp
mockupTemplateIdnumberYesMockup template used for warping
initialNormalizedUnwarpedRectMockupDesignRectYesNormalised, un-warped bounding rect of the design relative to the mockup board

updateMockupBoard(params)

Modifies an existing mockup board's template, size, or color-matching behavior.

PropertyTypeRequiredDescription
mockupBoardIdstringYesID of the mockup board to update
size{ width, height }NoNew dimensions
mockupTemplateIdnumberNoNew mockup template
shouldMockupColorMatchArtboardbooleanNoWhether fill matches the linked artboard