Skip to main content

sdk.guideapi

Home > @kittl/sdk > GuideAPI

GuideAPI interface

API for creating and managing guides (alignment lines) in the design.

Signature:

export interface GuideAPI 

Methods

Method

Description

createGuide(input, opts)

Creates a new guide in the design with the specified orientation and position.

This method creates either a horizontal or vertical guide at the specified coordinates. The guide will be added to the specified board, or to a floating board if no boardId is provided. Guides help users align design elements by providing visual reference lines.

updateGuide(input, opts)

Updates an existing guide by modifying its position coordinates.

This method allows you to reposition an existing guide by updating its coordinates. For horizontal guides, you can update the top coordinate, and for vertical guides, you can update the left coordinate. The system will validate that the coordinate being updated matches the guide's orientation.