code-connect icon indicating copy to clipboard operation
code-connect copied to clipboard

How to get the name of the icon component in Figma within figma.connect method?

Open stacysun-cb opened this issue 1 year ago • 5 comments

I have connected all the icons assets in Figma. I used scripts to generate code connect files and added name props using the component name like below. Screenshot 2024-08-28 at 12 58 17 PM

Now on IconButton component, it shows inconsistent behavior for name prop. Some icon renders code and some shows in instances. I was using name: figma.instance('icon') for the name prop. Screenshot 2024-08-28 at 1 03 41 PM Screenshot 2024-08-28 at 1 03 55 PM

My questions:

  • Despite the inconsistency, how to get the name prop on icon instances? The name props is not a design prop, but generated through script. We tried to add an name prop in Figma for each icon, but it seems there's no proper variable type to use.

Thanks!

Please provide: Code Connect CLI version: 1.0.6 Operating system: macOS

stacysun-cb avatar Aug 28 '24 17:08 stacysun-cb

At this point, we do not plan to add this model as it is not longer SOTA for small models.

joecummings avatar Apr 22 '25 21:04 joecummings