Skip to main content


Hello Figma Team,

I am developing a plugin that programmatically creates components and attempts to add text properties to text layers using the Plugin API (`addComponentProperty` and `boundComponentProperties`). However, even when following the documentation and ensuring the text node is a direct child of the component, the property is not being registered. The `componentPropertyDefinitions` object remains empty, and no property appears in the component’s properties panel.

**What I’ve tried:**
- Using the latest Figma desktop app (not browser).
- Cloning a frame, converting it to a component, and moving text nodes to be direct children.
- Calling `addComponentProperty` and setting `boundComponentProperties` on the text node.
- Logging the component structure and property definitions after creation.

**Sample log output:**
```
Component property definitions: {}
COMPONENT: Frame 1618869411 (id: 12:14)
  TEXT: I’ve tried therapy in the past (id: 12:12)
  TEXT: I’ve had some sessions before, and I’m considering returning or trying a new approach. (id: 12:13)
```

**Expected:**  
A text property should appear in the component’s properties panel, as it does when created manually via the Figma UI.

**Actual:**  
No property is registered, and the property definitions object is empty.

**Questions:**
- Is there a limitation or beta restriction on the `addComponentProperty` API?
- Are there additional requirements for properties to be registered on components?
- Is there a known issue or workaround for this behavior?

Thank you for your help!

 

Be the first to reply!

Reply