How to copy CSS from a layer in Figma
Copy the CSS for any Figma layer without Dev Mode: select the layer, right-click it, then choose Copy/Paste as, Copy as code and CSS.

Quick answer
Select the layer in the Layers panel, right-click it, and open Copy/Paste as. Choose Copy as code, then click CSS. Figma copies the layer's CSS to your clipboard, so you can paste it into your code editor. This works on the Free plan without switching to Dev Mode.
Steps at a glance
- Select the layer in the Layers panel
- Right-click the layer
- Open Copy/Paste as
- Choose Copy as code
- Click CSS
Interactive demo
Summary
Figma can turn a layer's styling into CSS you paste straight into your code. The option sits in the layer's right-click menu, so you do not need to open Dev Mode. It saves you from reading sizes and colors off the Design panel by hand.
Step-by-step guide
Step 1
Select the layer
Open your design file and find the layer in the Layers list on the left. Click Frame 1 or whichever layer you want to copy CSS from. The Design panel on the right updates to show that layer's properties.
Step 2
Right-click the layer
Right-click the selected layer in the Layers list. A context menu opens with copy, paste and layer options. Right-clicking the layer on the canvas opens the same menu.
Step 3
Open Copy/Paste as
In the context menu, hover over Copy/Paste as. A submenu opens with copy formats such as Copy as code, Copy as SVG and Copy as PNG.
Step 4
Choose Copy as code
Hover over Copy as code in the submenu. A further list of code formats opens beside it.
Step 5
Copy the CSS
Click CSS to copy the layer's styles as CSS. The list also offers CSS (all layers), iOS and Android. Paste the result into your code editor.
Why this matters
You are building a component from a design and need its exact size, fill and corner values. Copying the CSS from the layer gives you those values in one paste, so you skip retyping numbers and avoid small mismatches with the design.
Frequently asked questions
Do I need Dev Mode to copy CSS?
No. The CSS option in the Copy as code menu was available in the Design view on the Free plan. The menu points to Dev Mode for other code formats.
What other formats can I copy the layer as?
The Copy as code list also showed iOS and Android, and the Copy/Paste as submenu offers Copy as SVG and Copy as PNG.
Related guides
Continue with more step-by-step guides for getting work done.
How to convert Figma designs to codeCopy CSS from any Figma frame using right-click Copy as code, so you can hand off styles to a developer or paste them into your project.
How to export assets from FigmaLearn how to export a Figma layer as PNG and SVG assets by adding export settings, setting a 2x scale, and exporting every format in one click.
How to access free templates in FigmaFind free templates in Figma Community: open Design resources, filter by Free price, and preview a template before you open it in your own file.
How to create a component in FigmaTurn any shape into a reusable component in a Figma design file: select the layer, click Create component, then find it listed under Assets.
How to create a FigJam board in FigmaLearn how to create a FigJam board in Figma: open a new file, add a sticky note, type your idea, and pick the Section tool to start organizing it.
How to create a frame in FigmaLearn how to create a frame in Figma: pick the Frame tool, draw it on the canvas, and set its width in the Design panel on a free account.
Create interactive demos like this one — free, no coding required.
Start for free →