Set Props
element.setProps(props)
Set prop values on a component instance.
You can use this method to change one or more props by passing an array of prop IDs and new values.
A value can be a static override, a binding to a data source, or null to disconnect any existing binding and reset the prop to its component default.
The update is undoable via the Designer’s undo stack.
Syntax
Related interfaces:
Parameters
props: SetInstancePropEntry[] — An array of objects, each with the following fields:
Binding value shapes
Use an object with a sourceType field to bind a prop to a data source:
Pass null as the value to disconnect any binding and reset the prop to its component default.
Returns
Promise<SetInstancePropEntry[]>
A Promise that resolves to an array of the entries that were set, in the same shape as the input.