FigmaToCode icon indicating copy to clipboard operation
FigmaToCode copied to clipboard

Html node name from figma node name

Open bevrard opened this issue 2 years ago • 3 comments

Currently there is an option to get the name of the figma node as a class name.

Would it be possible to have a similar option to directly have a custom html node name? In that case, we would be able to directly use your html as our Angular template file.

Thanks in advance for your answer.

Benjamin

bevrard avatar Jun 29 '22 07:06 bevrard

Could you give an example? Like, for node with name 'node1', you want the output to have className: 'node1' ?

bernaferrari avatar Jun 29 '22 17:06 bernaferrari

figmaToHtml figmaToHtml2

It would be even more powerful if in a figma node name like this "label.superclass" could be export in html like this <label class="superclass" ...>

bevrard avatar Jun 30 '22 09:06 bevrard

I'd like to revive this feature request. I was testing the plugin and noticed all text is exported as a div when they should be paragraphs meaning everything needs to be manually updated.

The Figma to Webflow plugin solves this by allowing you to mark elements as a dom node. The node type allowed is based on whether a text node or layout element is selected in Figma.

All it is really doing is naming the layers using a preset syntax eg: [H1]--Layer Name which I guess is being used in generating the export code to identify the node type to use.

CleanShot 2023-08-18 at 12 51 21@2x CleanShot 2023-08-18 at 12 51 39@2x

andyjamesn avatar Aug 18 '23 05:08 andyjamesn