Skip to main content

sdk.guideapi.updateguide

Home > @kittl/sdk > GuideAPI > updateGuide

GuideAPI.updateGuide() method

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.

Signature:

updateGuide(input: UpdateGuideInput, opts?: DesignApiOptions): NormalizedGuideObject;

Parameters

Parameter

Type

Description

input

UpdateGuideInput

Configuration for updating the guide

opts

DesignApiOptions

(Optional) Additional options for the design API operation

Returns:

NormalizedGuideObject

The updated guide object with the new coordinates

Exceptions

When the specified guide ID doesn't exist in the design

When trying to update a coordinate that doesn't match the guide's orientation

When neither top nor left is provided in the input