getProp()

Gets the value of the specified widget property. Use this function in the widget's settings panel code.

For widgets built with a self-managed custom element, properties are bound to the element's attributes.

You can use getProp() to verify a value after setProp() when writing multiple properties in sequence.

Syntax

Copy

Parameters

NameTypeDescription
propNamestringName of the property that you want to get.

Returns

Promise<string>

Value of the property.

Example

Copy

Last updated: 25 August 2026

Did this help?