Connected data not found for setting color

Please fill out as many of the following questions as possible so we can help you promptly! If you don’t know how to answer or it does not apply, feel free to remove it or leave it blank.

Builder content link

Builder public api key

What are you trying to accomplish
set color from model data, see Use Data Models to create a color palette or swatches for your content

Screenshots or video link

Code stack you are integrating Builder with
html/web components

Hey @gkappel, thanks for getting this reported! Could you show a screenshot of your Content State expanded like this?

Ah, thanks for showing that, @gkappel. Your state object can sometimes appear empty in Builder, and we’re working on improving that behavior.

In the meantime, there’s an alternative way to connect your model information to your Builder project. Head to your color model settings and scroll down to the bottom. Switch to the REST API and copy the https://cdn.builder URL.

Then, on your page, create a new API Data Source:

Ideally, this will give you your State object back and show the colors there.

If this still isn’t working, you can still show your state object / use JS syntax to select your colors.

Here I have a text box placed on my page with a data binding of text to JSON.stringify(state), which allows you to see your state object. I’ve bound the background color of some other text to the orange color in my palette using state.colors.results[0].data.color :

I added an API data source as you instructed, that did not help with the empty state{} i the visual builder

I am able to bind the color to a data source or api in code as you indicated, but we are primarily evaluating for use by our marketing staff, if even the tutorials on the site do not work as indicated and you need to drop down to code workarounds that is concerning

Hey @gkappel! I’ve shared this feedback with my team and I’ll be sure to share updates regarding the Data Binding feature and State when they’re available.

Thank you!