Sets 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. Updating a widget property triggers the custom element's attributeChangedCallback() function.
| Name | Type | Description |
|---|---|---|
propName | string | Name of the property that you want to set. |
value | string | Value of the property that you want to set. |
Promise<void>
Notes:
setProp() resolves when the editor has accepted the write. It doesn't guarantee the value is already committed on the selected widget, or that the custom element on the canvas has received the corresponding attribute yet.setProp() call before starting the next one, and confirm each value with getProp() before the next write.Last updated: 25 August 2026