Made in Builder

Made in Builder

×

Developers

Product

Use Cases

Pricing

Developers

Resources

Company

Get StartedLogin

Product

Features

Integrations

Talk to an Expert

Pricing

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

Integrating Pages

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.

This Getting Started shows you how to connect the Builder.io drag-and-drop page building UI to your existing app. If you don't have an app already, you can use the Builder CLI to quickly generate one.

Create an app if you don't have one

👉 Tip: 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.

Add Builder as a dependency

To use Builder with your codebase, add Builder as a dependency.

Start the development server with the appropriate command:

Add a Builder component to your app

Adding drag-and-drop

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.

Creating a Builder Page

To give your app something to work with, click on the Content icon in the left side bar:

Click the +New button near the top right of the screen.

Create a new page in Builder and name it Test Page. Notice that Builder automatically generates the path as /test-page.

When you are prompted to choose a starting template, choose Blank. The editor for your new page loads automatically.

In your new page, drag in a Text block.

Click Edit and add something like, "I did it!!".

Click the Publish button in the upper right of the browser.

Setting the model preview URL

To enable Builder to open your site in the visual editor, you will need to provide a URL that we can open which has the Builder rendering component in it.

Go to the /models page in Builder and choose your page model.

Then, set the Preview URL to http://localhost:3000. Be sure to include the http://.

Note: 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.

Getting your API Key

To connect your Builder.io space to your application, get the API key as follows.

Go to your Account settings by clicking on the Account icon in the left sidenav.

In the Account settings, copy the Public API Key. 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.

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

If you're using the Angular CLI, the default port is 4200, rather than 3000. For Gatsby, the default port is 8000, and requires a restart for the Gatsby dev server to see your new page.

To make more pages, follow the same steps outlined here but with different names, such as "About us".

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.
  • Check that your browser will allow insecure content.

Builder Pages best practice

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:

Next Steps


Need Expert help?

Submit a project to our partners, BuildQuick, and be matched with a Builder expert.

Submit a project

Was this article helpful?