Register now: Best Builder Practices for Marketers & Designers

Announcing Visual Copilot - Figma to production in half the time

Builder.io logo
Contact Sales
Platform
Developers
Contact Sales

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 Content Link, formerly known as 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.

Click this link to go to the corresponding content entry within Builder. When you set this up in your project, an Open in Editor link for that piece of content displays, as in the following image.

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

The first requirement to using Vercel Content Link 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";

When making the call to fetch the data from Builder, 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.

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

Newsletter

Get the latest from Builder.io

By submitting, you agree to our Privacy Policy

Product

Platform Overview

Integrations

What's New

Open Source

Builder

Builder

Mitosis

Mitosis

Qwik

Qwik

Partytown

Partytown

Popular Guides

From Design to Code Guide

Composable Commerce Guide

Headless CMS Guide

Headless Commerce Guide

Composable DXP Guide

Design to Code

Resources

Blog

Knowledge Base

Community Forum

Partners

Templates

Success Stories

Showcase

Resource Center

Frameworks

React

React

Next

Next.js

Qwik

Qwik

Gatsby

Gatsby

Angular

Angular

Vue

Vue

Svelte

Svelte

Remix logo

Remix

Nuxt

Nuxt

Hydrogen

Hydrogen

See All

© 2024 Builder.io, Inc.

Security

Privacy Policy

SaaS Terms

Security & Compliance

Cookie Preferences