How to get the CSS selector code in Figma?

839 Views Asked by At

I have received a component library. I have to use its CSS for the relevant components in our webb-app. I go to "checkbox". I right-click on it and choose "copy as CSS". The CSS for all the states of a checkbox is then copied. But it is just the CSS declarations with their properties and values. The CSS selectors are missing. Is there any way to also get the CSS selectors from Sigma?

1

There are 1 best solutions below

2
On

As far as my experience, I usually type selector manually because most elements have a different class name or id than what's in the design. If you want it to work automatically, I think you can use plugin to convert from Figma to HTML. You can find them here https://www.figma.com/community/search?resource_type=plugins&sort_by=popular&query=figma+to+html&editor_type=all