UIAPI

API for managing and communicating with the plugin's user interface.

UIAPI interface

API for managing and communicating with the plugin's user interface.

Signature:

interface UIAPI

Example

// Send message to UI
creator.ui.postMessage({ type: "update", data: someData });

// Listen for messages from UI
creator.ui.onMessage((message) => {
  console.log("Received from UI:", message);
});

Properties

Property

Modifiers

Type

Description

theme

readonly

ThemeTokens

Current theme information including CSS tokens

Methods

Method

Description

onMessage(pluginMessage)

Sets up a message handler to receive messages from the plugin UI.

postMessage(pluginMessage)

Sends a message to the plugin UI

resize(opts)

Resizes the plugin UI window

show(opts)

Shows the plugin UI window

Last updated: August 5, 2026 at 11:47 AMEdit this page