add_component_prop
Adds a property to a component and binds it to a child node, enabling instances to override text content, visibility, or swap instances based on property type.
Instructions
Add a component property and bind it to a child node.
For TEXT properties: binds to the target text node's characters, so instances can override the text content. For BOOLEAN properties: binds to the target node's visibility.
Parameters: node: The component node ID (must be COMPONENT or COMPONENT_SET). name: Property display name. type: TEXT, BOOLEAN, or INSTANCE_SWAP. default: Default value. bind: Child node ID to bind this property to. For TEXT, binds to text content. For BOOLEAN, binds to visibility.
Examples: add_component_prop({node: "1:2", name: "Label", type: "TEXT", default: "Click me", bind: "1:5"}) add_component_prop({node: "1:2", name: "Show Icon", type: "BOOLEAN", default: "true", bind: "1:6"})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | Yes | Component node ID (e.g. "1:2") | |
| name | Yes | Property name | |
| type | Yes | Property type | |
| default | No | Default value | |
| bind | No | Child node ID to bind this property to |