Made in Builder.io

Ship Your First Personalized Web Experience webinar on June 15 @ 10AM PT. Register Now

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

Vercel Visual Editing is a feature within the Vercel site preview that adds a clickable link to any content powered by a Builder data model on your site. When clicked, this link will take you to the corresponding content entry within Builder. Once set up for your project, it will look like the following example.

Image of a theoretical company tile with the Open in Editor clickable link.

The first requirement to using Vercel Visual Editing in your Builder-powered Next.js site is to have something on your site powered by a Builder data model.

Next, use the Builder v3 Content API. Upgrade your React SDK to the latest version if your version does not support the apiVersion setting.

npm update @builder.io/react@latest

With an updated SDK version that supports the Builder v3 content API, add the following to your Next.js project.


  • Better support for localization (coming soon): The content API will provide improved support for localization, including querying based on localization features.
  • Support for multi-level nested references (coming soon): The content API will allow you to query, resolve, and return content that has nested references of other contents and symbols.
import { builder } from "@builder.io/react";

builder.init('YOUR_BULDER_PUBLIC_API_KEY');
builder.apiVersion = "v3";

Then, when making the call to fetch the data from Builder, you need to include the vercelPreview parameter and set it to true.

Make sure to include the logic that only sets this flag to true when Vercel is in preview mode, so your production deployments do not have the additional metadata that is added to make the Edit button display.

  const content = await builder.getAll("SOME_DATA_MODEL_NAME", {
    options: {
      vercelPreview: process.env.VERCEL_ENV === 'preview',
    },
  });

For more detail, read Vercel's documentation on Visual Editing.


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

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

Use Cases

© 2023 Builder.io, Inc.

Security

Privacy Policy

SaaS Terms