appProcess.current.getInfo

API reference for the appProcess.current.getInfo method.

Gets information about the current process.

import { appProcess } from "@canva/preview/platform";
const context = appProcess.current.getInfo();
if (context.surface === "object_panel") {
console.log("The process is running in the object panel");
}
tsx
#infoobject
Required

The information about the current process.

#info.surfacestring
Required

The location in Canva in which the process is running.

The possible values are:

  • "object_panel"
  • "selected_image_overlay"
#info.processIdstring
Required

The unique ID of the process.

#info.launchParamsobject
Optional

Arbitrary parameters passed from the app to the process when the process launches.