bernaferrari / FigmaToCode

Generate responsive pages and apps on HTML, Tailwind, Flutter and SwiftUI.
https://www.figma.com/community/plugin/842128343887142055
GNU General Public License v3.0
3.58k stars 262 forks source link

Html node name from figma node name #61

Open bevrard opened 2 years ago

bevrard commented 2 years ago

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

bernaferrari commented 2 years ago

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

bevrard commented 1 year ago

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" ...>

andyjamesn commented 10 months ago

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