Adding Textures
Textures apply overlay effects or detailed backgrounds to artboards. You can add or manage background textures utilizing kittl.design.texture.
Setting a Texture on a Board
To render a texture across an artboard, specify the board ID along with a source texturing string (such as an asset URL or ID).
const textureResult = await kittl.design.texture.setTexture({
boardId: 'my-main-board',
texture: 'https://example.com/texture.png',
options: {
opacity: 0.5,
mode: 'multiply' // Use blend modes for a realistic overlay
}
});
if (textureResult.isOk) {
console.log('Board textured.');
}
To remove or clear the texture layer, call kittl.design.texture.removeTexture({ boardId: 'my-main-board' }).