Skip to content

Latest commit

 

History

History
75 lines (38 loc) · 1.47 KB

File metadata and controls

75 lines (38 loc) · 1.47 KB

AnnotationsAPI

Interface: AnnotationsAPI

Defined in: figmaPluginTypes.ts:2034

See

https://www.figma.com/plugin-docs/api/figma-annotations

Methods

addAnnotationCategoryAsync()

addAnnotationCategoryAsync(categoryInput): Promise<AnnotationCategory>

Defined in: figmaPluginTypes.ts:2050

Adds a new AnnotationCategory.

Parameters

categoryInput

The label and color of the annotation category.

color

AnnotationCategoryColor

label

string

Returns

Promise<AnnotationCategory>


getAnnotationCategoriesAsync()

getAnnotationCategoriesAsync(): Promise<AnnotationCategory[]>

Defined in: figmaPluginTypes.ts:2038

Returns a list of all AnnotationCategorys that exist in the current file.

Returns

Promise<AnnotationCategory[]>


getAnnotationCategoryByIdAsync()

getAnnotationCategoryByIdAsync(id): Promise<null | AnnotationCategory>

Defined in: figmaPluginTypes.ts:2044

Returns an AnnotationCategory by its ID. If not found, returns a promise containing null.

Parameters

id

string

The annotation category ID to search for.

Returns

Promise<null | AnnotationCategory>