Skip to main content
Solved

Code Layer fails to render on Figma Sites canvas but works in Full Preview

  • August 20, 2026
  • 3 replies
  • 30 views

김동영

I’m experiencing an issue with Code Layers in Figma Sites.

A Code Layer fails to render on the canvas and shows the error message:

“Code Layer is not working.”

However, the exact same Code Layer renders correctly in Full Preview.

I first noticed this with a custom React Code Layer, so I simplified the code step by step to rule out implementation issues. The problem still occurs even with a newly created Code Layer containing only:

export default function Test() {
return <div>Code Layer Test</div>;
}

Reproduction steps:

  1. Create a new Code Layer in Figma Sites.
  2. Replace its code with the minimal example above.
  3. Return to the canvas.
  4. The Code Layer displays an error instead of its content.
  5. Open Full Preview.
  6. The same Code Layer renders correctly.

I also tested this with a completely new Code Layer, so the issue does not appear to be related to a specific component implementation.

Expected behavior:
The Code Layer should render on the Figma Sites canvas as well as in Full Preview.

Actual behavior:
The Code Layer fails on the canvas, while Full Preview works normally.

fails on the canvas
preview works normally

This makes it difficult to work with Code Layers while editing a page because their actual content cannot be seen on the canvas.

Please let me know if there are any known limitations, workarounds, or additional debugging information I can provide.

Best answer by adamsmasher

Ok, thanks for the info! Great news - this is now fixed! You’ll need to edit your Code Layer for it to show up, though this can be any kind of edit like adding a space or a new line. This will trigger it to update the render shown on the canvas. Let me know if you have any trouble!

3 replies

adamsmasher
Figmate
  • Figmate
  • August 20, 2026

Hi, ​@김동영. Thanks so much for taking the time to document this with a basic use-case - I appreciate it! 

 

I was actually able to reproduce this using the default code after adding a Code Layer to my own test site in Figma Sites. When did you first notice this happening? I’m checking with the team to see if this is a known issue or a new one, but it’d be helpful to know when you first noticed it occur. I’ll let you know if I hear anything I can share in the meantime. Thanks for your patience!


김동영
  • Author
  • New Member
  • August 21, 2026

Thanks for checking this and reproducing it on your side.
I first noticed this issue on August 18th, 2026 while working on a custom Code Layer.


adamsmasher
Figmate
  • Figmate
  • Answer
  • August 21, 2026

Ok, thanks for the info! Great news - this is now fixed! You’ll need to edit your Code Layer for it to show up, though this can be any kind of edit like adding a space or a new line. This will trigger it to update the render shown on the canvas. Let me know if you have any trouble!