Skip to content

Bindings

Data bindings connect HTML elements to manifest sources. Every dynamic value in an artifact must use data-shareout-binding — direct DOM manipulation via JavaScript hides values from the editor’s data panel and variable tracker.

data-shareout-binding="TYPE:PATH"
TypeSyntaxExample
JSON keyjson:keyjson:settings.theme
JSON nestedjson:key.path.to.valuejson:metrics.revenue.total
Table row fieldtable:name:row:$id:fieldtable:tasks:row:$id:title
Table row (static ID)table:name:row:ID:fieldtable:tasks:row:task-1:title
Table counttable:name:count:fieldtable:tasks:count:id
Table count filteredtable:name:count:field:filtertable:tasks:count:id:done=true
Table sumtable:name:sum:fieldtable:orders:sum:amount
Table avgtable:name:avg:fieldtable:orders:avg:amount
Computedcomputed:namecomputed:completedCount
<!-- CORRECT: editor tracks this binding -->
<span data-shareout-binding="json:metrics.revenue"
data-shareout-format="currency"
data-shareout-display="Total Revenue">$0</span>
<!-- WRONG: hidden from editor -->
<span id="revenue"></span>
<script>document.getElementById('revenue').textContent = await sdk.json.get('metrics.revenue')</script>

Apply a display format with data-shareout-format:

<span data-shareout-binding="json:metrics.revenue"
data-shareout-format="currency">$0</span>
FormatParametersOutput example
currency$1,234.56
percent12.5%
number1,234
number:00 decimals1,235
number:22 decimals1,234.56
dateMay 29, 2026
date:short5/29/26
date:longMay 29, 2026
date:iso2026-05-29
time3:45 PM
datetimeMay 29, 2026 3:45 PM

In Live Studio Inspect mode, bound elements show a Format control (plain text, number, currency, percent, date) that reads and writes data-shareout-format — no need to edit the attribute by hand.

data-shareout-display provides a human-readable label shown in the editor’s data panel:

<span data-shareout-binding="json:metrics.revenue"
data-shareout-format="currency"
data-shareout-display="Total Revenue">$0</span>

Add data-shareout-editable="true" to allow viewers to edit the value in place:

<input data-shareout-binding="json:settings.name"
data-shareout-editable="true"
data-shareout-validation="string:minLength=1:maxLength=100">
<input type="number"
data-shareout-binding="json:settings.goal"
data-shareout-editable="true"
data-shareout-validation="number:min=0:max=100">
<input type="checkbox"
data-shareout-binding="table:tasks:row:$id:done"
data-shareout-editable="true">
RuleSyntaxExample
Numbernumbernumber
Number with rangenumber:min=X:max=Ynumber:min=0:max=100
Stringstringstring
String with lengthstring:minLength=X:maxLength=Ystring:minLength=1:maxLength=50
Emailemailemail
URLurlurl
Patternpattern:REGEXpattern:^[A-Z]{2}[0-9]{4}$
<!-- Count all rows -->
<span data-shareout-binding="table:tasks:count:id">0</span>
<!-- Count filtered rows -->
<span data-shareout-binding="table:tasks:count:id:done=true">0</span>
<!-- Sum -->
<span data-shareout-binding="table:orders:sum:amount"
data-shareout-format="currency">$0</span>
<!-- Average -->
<span data-shareout-binding="table:orders:avg:amount"
data-shareout-format="currency">$0</span>

Reference a value declared in manifest.computed:

<span data-shareout-binding="computed:completedCount"
data-shareout-display="Completed Tasks">0</span>
  • Every dynamic value has data-shareout-binding.
  • No element.textContent = or innerHTML = without a corresponding binding.
  • Binding paths match keys and table names declared in the manifest.
  • Editable bindings have both data-shareout-editable="true" and data-shareout-validation.
  • Manifest — declaring sources that bindings reference
  • Templates — bindings inside repeating content use $id and $index
  • Overview — full attribute reference