UIAPI

API for managing and communicating with the plugin UI window.

UIAPI interface

API for managing and communicating with the plugin UI window.

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 window.

postMessage(pluginMessage)

Sends a message to the plugin UI window

resize(opts)

Resizes the UI window

show(opts)

Shows the UI window

Last updated: October 8, 2026 at 10:45 AMEdit this page