Livestream: Building landing pages with AI | 4/3

Announcing Visual Copilot - Figma to production in half the time

Builder logo
builder.io
Contact SalesGo to App

Livestream: Building landing pages with AI | 4/3

Announcing Visual Copilot - Figma to production in half the time

Builder logo
builder.io

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

Once you've imported data into your content entry, view the shape and contents of that data within the Content State panel in the Data tab.

  • The Content State panel displays your data as a JavaScript object called state.
  • Use double curly braces ({{}}) to input data from state into text.

After following the steps in Connect Data or Use Existing Data, go to the Content State panel within the Data tab to view your data as a JavaScript object. Data is stored within an object called state that can be accessed by other parts of the Data tab.

The state object can be accessed in other parts of the Data tab, typically within text fields or code blocks.

Visual Editor with the Content State panel open, displaying a JavaScript object representing all data within the current content entry.

The Content State panel is a good way to confirm that data is available on your content entry. It is also useful when using an API or external data to understand what data has been imported.

State can be used within the Visual Editor in several ways. One of the most common ways is to create text content that depends on values stored within state.

Within a text block, use double curly braces ({{}}) around a state variable. This will input the value stored in state into the text content.

Note: Some knowledge of JavaScript is useful to use this feature. If you find yourself stuck, you may want to reach out to a developer on your team for assistance.

Example

In the image below, the name of a store's location has been added to a text box within double curly braces to format the name of the store.

The Visual Editor displays an open text box, showing how using curly braces will allow the user to insert data into text.

The name of a store's location is accessed using the following code:

{{state.storeLocationData.data.name}} Location

In JavaScript, the text between the double curly braces is called dot notation. Dot notation is a way to access nested properties of objects in JavaScript.

Beginning with state, when you click a dropdown arrow within the Content State panel, you add another word after the previous, joined by a dot.

In this example, you begin with state, then go to storeLocationData, then data, then name. That leads to the JavaScript code above.

If the data entry is ever changed, the text will update automatically.

When you Bind multiple data entries, you may use state within text for each entry. However, you need to replace state.[yourPropertyName] with resultsItem.

Example

In the image below, the name of a store's location has been added to a text box within double curly braces to format the name of the store.

The Visual Editor displays an open text box, showing how using curly braces will allow the user to insert data into text.

The name of a store's location is accessed with the following code because each text box is repeated over each item within storeLocationData.

{{resultsItem.data.name}} Location

Connect Data stored within Builder or Use Existing Data to populate your state object. Or, leverage Content Inputs to create custom state for a Page or Section.

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

By submitting, you agree to our Privacy Policy

  • Platform Overview

  • Integrations

  • What's New

  • Figma to Code Guide

  • Composable Commerce Guide

  • Headless CMS Guide

  • Headless Commerce Guide

  • Composable DXP Guide

  • Design to Code

  • Blog

  • Knowledge Base

  • Community Forum

  • Partners

  • Templates

  • Success Stories

  • Showcase

  • Resource Center

    Glossary

© 2025 Builder.io, Inc.

Security

Privacy Policy

SaaS Terms

Security & Compliance

Cookie Preferences

Gartner Cool Vendor 2024