Set prop settings (Beta)
Set prop settings (Beta)
Set prop settings (Beta)
component.setProp(propId, updates)Updates one or more settings on an existing prop.
Only the settings that you pass to this method change.
This method returns the full updated Prop object, not only properties that changed.
To clear a setting, pass undefined as its new value.
This action is undoable in the Webflow Designer.
A prop’s type cannot be changed after creation. Passing a type field returns an error.
These methods are in public beta and may change with future releases.
The method accepts two call signatures: an ID string plus an updates object or a single object that includes the id field.
SetPropOptions — all fields are optional:
propId : string — The unique ID of the prop to update (first-argument signature only).updates.name : string — (optional) The new display name. If a prop with the same name already exists in the same group, the name is automatically incremented (for example, Heading becomes Heading 2).updates.group : string | null — (optional) Move the prop to a different group, or pass null to remove it from its group.updates.tooltip : string | null — (optional) New tooltip text, or null to remove the tooltip.updates.defaultValue : varies by type — (optional) New default value. The shape must match the prop’s type. Pass null to clear the default value.updates.multiline : boolean — ('textContent' only, optional) Whether the text input supports multiple lines.updates.min : number | null — ('number' only, optional) Minimum allowed value. Pass null to remove the constraint.updates.max : number | null — ('number' only, optional) Maximum allowed value. Pass null to remove the constraint.updates.decimals : number | null — ('number' only, optional) Number of decimal places allowed. Pass null to remove the constraint.updates.trueLabel : string | null — ('boolean' only, optional) Label shown when the value is true. Pass null to remove the label.updates.falseLabel : string | null — ('boolean' only, optional) Label shown when the value is false. Pass null to remove the label.Promise<Prop>
A Promise that resolves to the full updated Prop object after the update is applied.
The Prop interface uses the same shape as the return value of component.createProp():
Update the default value of a link prop:
Update a prop name and tooltip using the object-with-ID signature:
Update number constraints:
Move a prop to a different group:
Remove a prop from its group:
Remove a tooltip: