Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home
  • Figma Sites – Figma Learn
  • Make your site interactive

Guide to code layers in Figma Sites

Written by Figma Man

Updated at June 19th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Administration – Figma Learn
    Manage files and projects Manage a team Manage your account Manage a Figma organization Manage Enterprise plan settings and permissions Billing Manage Figma in a school
  • Figma Design – Figma Learn
    Create prototypes Import and export Create designs Tour the interface Dev Mode Work together in files Build design systems Figma Draw
  • Get started – Figma Learn
    Set up your account Layers 101
  • FigJam – Figma Learn
    Import and export Run meetings Work on boards Tour the interface
  • Community – Figma Learn
    Explore the Community Creator tools and resources
  • Help – Figma Learn
    Troubleshoot Common questions Work with support
  • Work across Figma – Figma Learn
    Figma AI Work across Figma
  • Courses, tutorials, projects – Figma Learn
    Courses Projects
  • Figma Slides – Figma Learn
    Create and edit slides Present slide decks Tour the interface Import and export
  • Figma Buzz – Figma Learn
    Templates in Figma Buzz Create and edit assets in Figma Buzz Overview
  • Figma Make – Figma Learn
    Tour the interface Work with Figma Make
  • Figma Sites – Figma Learn
    Design a site Create webpages and breakpoints Make your site interactive Preview and publish a site Tour the interface
+ More

Table of Contents

Key features Chat with AI, or write your own code Use existing designs or start from scratch Turn code layers into components and instances What’s the difference between code layers and Figma Make?

Who can use this feature

Available on all paid plans

Requires edit access to the site file

AI features must be enabled to chat with AI

Code layers add custom functionality to your site, enabling you to explore ideas, experiment, and enhance your designs using the power of code.

Like frames and shapes, code layers are another type of layer you can add to the canvas in Figma Sites. What makes code layers unique is how you edit content inside the layer. When you edit a code layer, you can either describe what you’d like to create with AI, or write React code yourself. Or both!

People use code layers to:

flow.webp

Create new site elements entirely in code

dot-grid.webp

Create custom interactions

api.webp

Connect real data sources to your designs

carousel.webp

Add motion or animations to an existing design

Key features

Chat with AI, or write your own code

In the code composer, you can describe what you want to make, refine it, or even roll back to previous versions. If you’d prefer to work with the code directly, use React, Typescript, and Tailwind CSS to bring your idea to life.

Learn more about working with code in Figma’s developer documentation.

Use existing designs or start from scratch

You can convert an existing design to a code layer to add interactivity and expressiveness to it. Or, you can create a new code layer on the canvas and start describing your vision without any reference designs.

Learn more about creating code layers from existing designs.

Turn code layers into components and instances

Like other layers, code layers can be turned into reusable components. You can then insert instances of the same component on the canvas.

For example, imagine you want to show live stock prices for different companies on your website. You want each of them to look the same, have the same functionality, but for different stocks.

You can create one stock ticker component, then place many instances of that component in your site.

What’s the difference between code layers and Figma Make?

Figma Make is an AI-driven, prompt-to-code tool that lets you bring ideas and existing Figma designs to life as functional prototypes, web apps, and interactive UI.

With code layers, you’re accessing the power of Figma Make inside of Figma Sites. Here is some advice for picking which tool to use:

Use Figma Make if:

  • You want to start purely from a prompt and get all the way to a functional app
  • You don’t need a canvas or don’t want to do a lot of precise designing

Use code layers in Figma Sites if:

  • You’d rather start designing on the canvas and want to add custom interactivity and/or motion
  • You’re adding interactivity to a website design

Ready to dive in? Get started by creating your first code layer.

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Edit a code layer
  • Add a code layer to a site
  • Add links to a site
  • Add interactions to an element
  • Blog
  • Best practices
  • QR code generator
  • Color wheel
  • Colors
  • Color picker
  • Color palettes
  • Color palette generator
  • Color contrast checker
  • Font Library
  • Templates
  • Developers
  • Integrations
  • Affiliate program
  • Resource library
  • Reports and insights
  • Support
  • Status
  • Legal and privacy
  • Modern slavery statement
  • Climate disclosure statement
  • COMPARE
  • Sketch
  • Adobe XD
  • Framer
  • Miro
  • COMPANY
  • Events
  • Customers
  • Careers
  • Newsroom
Expand