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)
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
- Open your project and go to the Assets panel on the left.
- Switch to Code.
- Click Create code file (or the + button) and give it a name, for example
PricingSection. - Framer opens its code editor with a small example component.
Paste the section
- In the Ariva library, open a section and choose Copy for Framer.
- Back in Framer’s code editor, select everything with ⌘ + A (or Ctrl + A) and paste over it.
- 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
- Drag the component from Assets → Code onto your page, inside the stack or frame where the section should go.
- Set its width to Fill (100%) so it spans the page, and its height to Fit content.
- 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
- An error about a missing export, or a blank preview. Part of the old example code is still in the file. Select all, paste the section again and save.
- The section is cut off. The component has a fixed height. Set height to Fit content.
- Fonts look different. The section inherits the font of the page around it. Set the font on the parent frame or page, or change the font family in the file’s CSS.
- No scroll animation in the canvas. The fade-in runs when the section scrolls into view in preview or on the published site.
Sections to try this with

Waitlist capture
Hero · H1
Three tiers
Pricing · H2, H3
Newsletter signup
CTA · H2
Single statement
TestimonialsMore guides
Start with the free sections
Make a free account and copy any free section into Webflow, Framer, Figma or code.