getProp()

Gets the value of the specified widget property.

Syntax

Copy
function getProp(propName: string): Promise<string>

Parameters

NameTypeDescription
propNamestringName of the property that you want to get.

Returns

Promise<string>

Value of the property.

Example

Copy
import { editor, widget } from "@wix/editor"; import { createClient } from "@wix/sdk"; const client = createClient({ host: editor.host(), modules: { widget }, }); async function getWidgetProp(propName) { const response = await client.widget.getProp(propName); }
Did this help?