Home / Guides / How to add a code component to Framer (and paste a ready-made section)

How to add a code component to Framer (and paste a ready-made section)

By Ariva Studio · November 24, 2026

Framer code components are React components that render on the canvas, in preview and on your published site. That makes them a quick way to bring a ready-made section into a Framer project. Here is how to create one, paste a section in, and make it behave in your layout.

What a code component is

A code component is a file of React code that lives in your Framer project. Framer shows it on the canvas like any other layer, and you can resize it, position it and use it on any page. Ariva sections copy as a single self-contained file: the layout, its CSS and a small scroll-in animation, with nothing to install.

Create a code file

  1. Open your project and go to the Assets panel on the left.
  2. Switch to Code.
  3. Click Create code file (or the + button) and give it a name, for example PricingSection.
  4. Framer opens its code editor with a small example component.

Paste the section

  1. In the Ariva library, open a section and choose Copy for Framer.
  2. Back in Framer’s code editor, select everything with ⌘ + A (or Ctrl + A) and paste over it.
  3. Save with ⌘ + S. The preview on the right should show the section.

Replace the whole file, not just part of it. The pasted code has its own imports and a single default export; mixing it with the example code is the most common cause of errors.

Place it on the canvas

  1. Drag the component from Assets → Code onto your page, inside the stack or frame where the section should go.
  2. Set its width to Fill (100%) so it spans the page, and its height to Fit content.
  3. Check the tablet and phone breakpoints. Ariva’s Framer sections respond to the width of their own frame (they use CSS container queries), so the layout adapts wherever you put them, including inside narrower columns.

Edit the text and images

Because a code component is code, its text is not edited on the canvas like a text layer. Open the file and look for the text you want to change: the headline, paragraphs and button labels are plain strings inside the file. Change them, save, and the canvas updates. Image addresses are in the same place; replace them with URLs of your own images.

If you would rather edit everything visually, copy the same section into Figma as layers first, adjust it there, and rebuild it with native Framer layers. For most landing pages, editing the few strings in the code file is faster.

Common errors

Sections to try this with

Waitlist capture hero section preview

Waitlist capture

Hero · H1
Free
Three tiers pricing section preview

Three tiers

Pricing · H2, H3
Free
Newsletter signup cta section preview

Newsletter signup

CTA · H2
Free
Single statement testimonials section preview

Single statement

Testimonials
Free

More guides

How to copy and paste a section into Webflow (step by step)Landing page structure: the sections most sites need, in orderFigma to Webflow: three ways to get a design liveWebflow vs Framer for client websites: how to chooseHow to build a waitlist page that people actually sign up toHow to design a pricing section that gets readHow to build a hero section that explains your site in five secondsHow to build and organise a component library for client workHow to add website sections to your project with Claude or CursorAll section types

Start with the free sections

Make a free account and copy any free section into Webflow, Framer, Figma or code.

Create a free account