You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code Connect CLI version [use npx figma -V if using React, or figma -V otherwise, to get the version of your CLI]
Operating system
Code Connect file, Figma design and/or relevant code snippet that could help us get more context
If you prefer not to share those publicly please reach out via the Figma support
How to use an instance in a tag's attribute, typically refers to dynamically binding a component instance (such as an icon instance) to a property of an HTML tag in Figma Connect.
We have code like this: iconValue:figma.children('*'), <Button class=${props.className} :icon=${props.iconValue} hasIcon=${props.icon}> <div slot="icon">${props.iconValue}</div> </Button>
However, that displays like this with the layer name:
How can I get the code like this:
The text was updated successfully, but these errors were encountered:
Dang-xiaorui
changed the title
How to use an instance in a tag's attribute in Figma Connect?
[HTML]How to use an instance in a tag's attribute in Figma Connect?
Nov 7, 2024
The "Code Connect Error" string. This seems like a bug on our side that we'll investigate and fix in a future version.
Support for rendering the icon name in the example. This is is something we recently added support on the React API (here) but isn't not supported at the moment by the HTML one.
Hi @Dang-xiaorui, we don't have a timeline to share on icon support in the HTML API right now - as we've just released for React we'd like to review how this has been received before implementing it for other frameworks.
Please provide:
npx figma -V
if using React, orfigma -V
otherwise, to get the version of your CLI]How to use an instance in a tag's attribute, typically refers to dynamically binding a component instance (such as an icon instance) to a property of an HTML tag in Figma Connect.
We have code like this:
iconValue:figma.children('*'),
<Button class=${props.className} :icon=${props.iconValue} hasIcon=${props.icon}> <div slot="icon">${props.iconValue}</div> </Button>
However, that displays like this with the layer name:
How can I get the code like this:
The text was updated successfully, but these errors were encountered: