Made in Builder.io

Join us for an AI launch event by

Builder.io and Figma
Talk to Us
Product
Developers
Talk to Us

Blog

Home

Resources

Blog

Forum

Github

Login

Signup

×

Visual CMS

Drag-and-drop visual editor and headless CMS for any tech stack

Theme Studio for Shopify

Build and optimize your Shopify-hosted storefront, no coding required

Resources

Blog

Get StartedLogin

As a developer, you can integrate Builder into your codebase and give other team members, such as content editors, marketers, and designers, the ability to build and manage pages without ever having to ping you.

Tip: This guide is step-by-step. If you'd prefer a more succinct guide to integrating, see Developer Quickstart, which is a cheatsheet version of this document.

We highly recommend that you integrate Builder into an existing app; however, if you need to create an app, follow the steps for your framework in this section.

Tip: On Windows, be sure to use quoting when you install dependencies that use the @ operator; for example, npm install "@builder.io/react".

Start the development server:

Builder adds the ability for your team members–even those who don't code–to create and iterate on ideas with a drag-and-drop interface.

Head over to Builder.io to sign up for an account if you don't already have one. Come back when you're logged in.

This next video covers the steps in this section of the tutorial all in one place to give you an idea of how it all works and the end result. This example uses Next.js but all frameworks use the same process:

To connect your Builder.io space to your application, add the Public API key to your code.

Find your Public API Key within Builder.io in one of two ways:

  • Press Cmd/Ctrl+k in Builder to bring up the command palette and search for API Key. Clicking the Public API Key copies it to your clipboard.
  • Go to Account Settings and copy your Public API Key.

For more detail about the Public API Key, see Using Builder API Keys.

Paste the Public API Key into your app by replacing the YOUR_API_KEY placeholder in your code. This location varies depending on your framework and is covered in the earlier sections of this tutorial.

The following video shows copying the Public API Key and pasting it into a Next.js app.

To enable Builder to open your site in the Visual Editor, provide a URL that Builder can open which has the Builder rendering component in it.

  1. Go to Models and choose the Page model.
  2. Set the Preview URL to http://localhost:<your-port>, where <your-port> is the port your app is using. Be sure to include the http://.
  3. Click Save.

The following video shows these steps:

Create a Builder Page to use with your integrated app.

  1. Go to Content.
  2. Click the +New button near the top right of the screen.
  3. Create a new page in Builder and name it Test Page. Notice that Builder automatically generates the path as /test-page.
  4. When you are prompted to choose a starting template, choose Blank. The editor for your new page loads automatically.
  5. In your new page, drag in a Text block.
  6. Click Edit and add something like, "I did it!!".
  7. Click the Publish button in the upper right of the browser.

The next video shows creating a page in a Builder-integrated app and dragging in a text block:

Tip: After you deploy your updates, be sure to update this to a public URL, such as your live site or your staging site; for example, https://your-site.com, so anyone on your team can connect to your site for visual editing.

Depending on the framework, the path and port can vary. Check your framework according to the below:

Frameworklocalhost URL

Angular

http://localhost:4200

Gatsby

http://localhost:3000

Qwik

http://localhost:5173

Remix

http://localhost:3000

Go to http://localhost:<your-port>/test-page and check out your work. Well done!

If you're getting a 404 but aren't sure why, check these things:

  • Make sure you've published your page in Builder by clicking the Publish button on the upper right corner.
  • Check the URL. If you name the page test2 for example, Builder adds a hyphen, so that the URL segment is test-2.
  • Make sure that you've set the preview URL on the Page Model.

We recommend that you place your Builder pages between your header and footer. A common use case is developers keeping headers and footers in their codebase while integrating page building. In this way, non-developer team members can iterate on pages, without having to rely on developers.

To use Builder pages between your header and footer, follow the guidance below for your framework:

For a community example with Builder and Next.js that includes ISR capabilities and SEO optimizations, see Kenzitron's Builder.IO & NextJs starter with ISR & SEO optimization on GitHub.

This guide demonstrated integrating page building into an app. For more demo apps in many frameworks, see Builder's GitHub repository for complete examples.


Looking to hire a third party to help with your project?

Submit a project request and our partnerships team will reach out to connect you with an Expert from our partner ecosystem.

Connect with us

Was this article helpful?

Product

Visual CMS

Theme Studio for Shopify

Sign up

Login

Featured Integrations

React

Angular

Next.js

Gatsby

Get In Touch

Chat With Us

Twitter

Linkedin

Careers

© 2020 Builder.io, Inc.

Security

Privacy Policy

Terms of Service

Get the latest from Builder.io

Developer Newsletter

Latest tips, tricks, and news for frontend developers from our blog

Product Newsletter

Latest features and updates on the Builder.io platform

By submitting, you agree to our Privacy Policy

Product

Features

Pricing

What's New

Developers

Builder for Developers

Developer Docs

Open Source Projects

Performance Insights

Headless CMS: Visual Guide

Resources

Documentation

Blog

Community Forum

Templates

Partners

Submit an Idea

Use Cases

Landing Pages

Headless CMS

Headless Storefront

Customer Showcase

Customer Success Stories

Builder.io logo

Visually build and optimize digital experiences on any tech stack. No coding required, and developer approved.

Get Started

Log In

Product

Features

Pricing

Integrations

React.js

Next.js

Gatsby

Angular

Vue

Nuxt

Hydrogen

Salesforce

All Integrations

Use Cases

© 2023 Builder.io, Inc.

Security

Privacy Policy

SaaS Terms