Bindings
Concept: a binding is the line that connects engine data to a control property
A control's properties are set in two ways: a static value ("text": "Hello"), and a binding that pulls in data the engine computes (#property). A binding is written as an item of the bindings array, and one item is one line. There are five kinds.
binding_type | What it reads | Use |
|---|---|---|
global (default when omitted) | Global properties the screen receives from the engine | When taking a value as is |
view | A property of another control (or itself), or an expression | When computing or copying |
collection | An item property of a collection | Factory and grid items |
collection_details | Collection item details (press counting, etc.) | Server form buttons |
none | Reads nothing | Once in vanilla |
Step-by-step examples
-
The simplest form: put the engine property
#hardtextas is into a label'stext.{ "label": { "type": "label", "text": "#hardtext","bindings": [ { "binding_name": "#hardtext" } ] } } -
binding_name_override: put the received value into a property name you choose. It is often used for#visibleand#enabled.{ "send_button": { "bindings": [{ "binding_name": "#using_touch", "binding_name_override": "#visible" } ] } } -
A
viewbinding: read a property of another control and write it to your own property. Make a panel visible only when a toggle is on.{ "panel": { "bindings": [ {"binding_type": "view","source_control_name": "my_toggle","source_property_name": "#toggle_state","target_property_name": "#visible" } ] },"my_toggle": { } } -
An expression: if you write a parenthesized expression in
source_property_name, the computed result goes intotarget_property_name. At least one#propertymust be in it (BND-05).{ "binding_type": "view", "source_control_name": "image", "resolve_sibling_scope": true,"source_property_name": "(not (#texture = ''))", "target_property_name": "#visible" }
(Steps 1~3 rewrite the explanation of the Bedrock Wiki Intro, and 4 has the same form as dynamic_button in vanilla server_form.json.)
The binding key table of the Bedrock Wiki
Excerpt: JSON UI Documentation, Data Binding · docs/json-ui/json-ui-documentation.md · Bedrock Wiki · License CC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository) · Commit 0930b39
Property Type Description ignored boolean If binding should be ignored (default false)binding_type enum global,view,collection,collection_details,nonebinding_name string Stores the value of the data binding name or condition with it binding_name_override string Name of the UI element property that will apply the stored value in binding_namebinding_collection_name string Name of the collection of items to be used binding_condition enum Condition for the data binding to happen: always,always_when_visible,visible,once,none,visibility_changed
Binding keys in Microsoft Learn
The bindings entry of the MS Learn minecraft:ui_element document lists binding_collection_name (the collection name of a collection binding), binding_condition (when to evaluate), binding_name (the data source to bind, for example #player_name), binding_name_override (the property of the element to put the value into), binding_type, source_control_name (the source control of a view binding), source_property_name and target_property_name (Source: ms-learn). This document omits binding_collection_prefix, resolve_sibling_scope and others, and its enum values are empty, so use the tables below (keys of a binding item, binding_condition) as the reference.
Rules
A binding moves engine data (#property) into a control property, or computes a new property with an expression. One item of the bindings array is one binding.
Evidence from Cinnabar (CN, Rust code that reconstructs the JSON UI parser of the 26.30 native client) has the level code, and CN-run is the result of this project running that evaluator directly. If it differs from game measurement, follow measurement. NB was read by analyzing the native library of the Android 1.26.52.3 client, and its level is code. DF was measured on Windows 1.26.52 while building the research server, in a structure that draws several screens with one server form.
Keys of a binding item
| Key | Meaning |
|---|---|
binding_type | global, collection, collection_details, view, none |
binding_name | The property name the engine gives (#title_text, #form_button_text …) |
binding_name_override | The name of your own property to put the received value into (#text, #visible, #collection_length …) |
binding_collection_name | The collection name (form_buttons, custom_form, container_items …) |
binding_collection_prefix | The prefix of a collection that has a prefix (student_buttons, etc.) |
binding_condition | When to re-evaluate |
source_control_name | The name of the other control to read the value from in a view binding |
resolve_sibling_scope | If true, looks up source_control_name in the sibling scope |
source_property_name | The expression or property to read in a view binding |
target_property_name | The property to write the view binding result to |
- [BND-01] Use the binding keys in the table above.
resolve_ancestor_scopenever appears in vanilla, so do not use it (resolve_sibling_scopehas 53 uses). The engine reads this key (ancestor scope, BND-25 and BND-36). On Windows 1.26.65.1,resolve_ancestor_scopewas accepted without anUnknown propertylog and read the ancestor, but a plainsource_control_nameread without any flag also found a sibling, a cousin, an ancestor and a distant control at the top of the window (measurement record).{vanilla, code (binary), measured}(Source: VN, MJ 4.2-1, NB-09) - [BND-02] An item that omits
binding_typereads a global property (for example{ "binding_name": "#title_text" }).{vanilla, code (source), inferred}(Source: VN server_form.json:138, BC 4.1, BA chapter 2, BW-intro, BW-dyn) - [BND-03] Counts of
binding_typethat vanilla uses:collection787,collection_details287,global265,view240,none1. Templates often receive this value as a variable ($store_factory_binding_type, etc.).{vanilla}(Source: VN, value dictionary) - [BND-22] An unknown
binding_typeacts asglobal, and an unknownbinding_conditionis logged and acts asnone. The Cinnabar reconstruction logs an unknownbinding_type, but in the Android 1.26.52.3 and Windows 1.26.65.1 decompilation it becomesglobalwithout a log, and only a non-string value leavesJSON UI parse failure - expected a string.(code, not measured in game). A typo becomes "silently different behavior", so copy values from the table.{code (source), code (binary)}(Source: NB-09 (binding_condition), CN tests B07 and B13 (binding_type), 2026-11-20 decompilation)
binding_condition
| Value | Vanilla | Meaning |
|---|---|---|
| (omitted) | many | Engine default |
visible | 135 | When visible |
once | 106 | Only the first time |
always | 97 | Continuously |
always_when_visible | 66 | Continuously while visible |
visibility_changed | 7 | When visibility changes |
none | 6 | Every time the data updates (BND-23). Not in the official schema enum |
- [BND-04] A bound property belongs to the control that has the binding. If you put a collection binding on a button and use
#form_button_textin a label two levels down, it comes out blank. The value is bound directly by the control that draws it, or copied with a view binding (BND-08).{measured}(Source: BC-S7) - [BND-05] If a view binding expression has no
#propertyat all, the errorMust define a source property name in the binding!occurs, and the whole bindings array of that control is discarded. To use a constant, put in any property like((#v = #v) * 40). The Cinnabar reconstruction discards only that one binding (conflict C-43).{measured}(Source: BC-S12, conflict C-43) - [BND-06] For a value that only needs to be decided once (for example whether a toast icon shows),
"binding_condition": "once"reduces cost. It is re-evaluated when a factory recreates the control.{working pack}(Source: BA chapter 6, AP 4.5) - [BND-07] A binding inside a cell created by a factory can run too early and stay empty (it shows only after losing and regaining focus). Give it
binding_condition: "always", or read it outside the factory and copy it in withsource_control_name. If thevisibleinside a cell is alsoalways, it applies immediately. A cell can read outside controls but the outside cannot read the cell (BND-19). A title check in a label inside the server formlong_form, with both the#title_textbinding and the view binding set toonce, was right from the first open (measurement record).{measured}(Source: BC-S11, BW-dyn, 2026-11-19 Windows 1.26.65.1) - [BND-23] Meaning of
binding_condition:noneon every data update,oncethe first time,alwaysevery update,always_when_visibleandvisibleonly when visible,visibility_changedonly when visibility changes. The six values match the engine's name table (BND-35).{code (source), code (binary)}(Source: NB-09 (value list), CN (meaning)) - [BND-35]
binding_conditionmust be a string (otherwise the error- expected a string.), and its values are six:none,once,always,always_when_visible,visibleandvisibility_changed. If omitted or an unknown value, it acts asnone(the same as BND-22 and BND-23).{code (binary)}(Source: NB-09) - [BND-31] Keep the
#visibleof a layout chosen by title atbinding_condition: "always". Withonce, a layout that briefly matched while the form switched to the next form stayed on over the next form.{measured}(Source: DF) - [BND-32] If you put
binding_condition: "visible"on the length binding (from#form_button_contentsto#collection_length) of a factory inside a layout that started withvisible: false, a layout hidden because its title did not match did not create button cells (the "creation is not stopped" of COL-10 is about the layout control itself). When used on a layout that is visible from the start, even the hidden layout created cells on the first frame. Usingalways_when_visibleor omitting in the same place left the bindings of cells created on the first frame unupdated, so text and markers were empty.{measured}(Source: DF) - [BND-37] In one control's
bindings, putting the collection binding first and the view binding that reads its value after it filled the grid cells from the first frame with neither of them onalways(100 and 2000 buttons, name and description labels and icon; the cell'scollection_detailsand the grid length binding werealways). With the list open it was about 0.07ms per frame lighter than the version withalwayson both bindings (VSync off, about 284 to about 290 fps), and the difference was the same from 100 up to 20000 buttons. The opening cost was the same for both and grew with the button count (Filling the first frame without always). In the reverse order the view is expected to read the still empty value first, but the reverse order was not measured (inferred, BND-07). A version of the same cell that wrote the expression straight into the collection binding'sbinding_namewithbinding_name_overrideinstead of a view froze the client when the list opened; which expression caused it was not isolated.{measured}(Source: 2026-11-18, Windows 1.26.65)
View bindings and reading other controls
// Take and use a value computed by a sibling
{ "binding_type": "view",
"source_control_name": "image", // The control to read
"resolve_sibling_scope": true, // Look it up in the sibling scope
"source_property_name": "(not (#texture = ''))",
"target_property_name": "#visible" }
(The same form as dynamic_button in vanilla server_form.json)
- [BND-08] Read another control's property with
source_control_name. When reading a sibling, also giveresolve_sibling_scope: true.{vanilla, working pack}(Source: VN 236 and 53 uses, example server_form.json:156, BA chapter 6, BW-intro, BW-form) - [BND-09] The default of
#visibleistrue. If an expression fails (an unsupported operator, etc.), the property stays at its default, so it becomes "always visible". If a hide condition does not take effect, suspect the expression first. In the Windows 1.26.65.1 code it is not "stays at its default" but "writes the default true": when the expression result is null, the#visiblehandling reads it as the default true and writes visible as true (the section on global binding names the engine answers). So a control with a static"visible": falsebecomes visible when a failing expression binding or a binding with no answer is attached. On Windows 1.26.65.1 a label with a static"visible": falsewas hidden with no binding, and the same label was shown when the nonexistent global binding#re9_nonexistent_bindingwas bound to#visible. A failing expression was not measured.{measured, code (binary)}(Source: BC-facts, BC 6.2-1, 2026-11-24 decompilation, 2026-11-25 Windows 1.26.65.1) - [BND-10] Do heavy calculations such as string parsing once in one place, the parent (or a data source), and have children take only the result with
source_control_name.{working pack}(Source: BA chapter 6) - [BND-11] If several places must read the same value, put a size-0 "data source" control at the screen root and have each gate read that value with a view binding. It is also a way to read only the data without putting a native input (a radio, etc.) inside a collection item.
{code (source), measured}(Source: BC 4.1-(5), BC-rules) - [BND-19] A control created by a factory or grid can read properties of an outside control with
source_control_name, but outside controls cannot read the properties of created controls. Put values to share in a data source outside the factory (BND-11).{unverified}(Source: BW-dyn "Useful Information") - [BND-20]
resolve_sibling_scope: truelimits thesource_control_namesearch to the sibling scope, but if the parent and a sibling have the same name, the parent takes priority. Name the control to read so that it does not collide with ancestors. Cause: the sibling search starts breadth-first from the parent itself (BND-25).{code (source)}(Source: BW-doc Data Binding table, CN) - [BND-24] A view binding without
source_control_namereads its own bag, and a property not there is read from the screen controller (global). A named view does not fall through to global. In game, a label in the server formlong_form_scrolling_contentthat read#form_textthroughsource_control_namefrom a sibling panel without bindings showed the form body. With a control name that does not exist it was empty, and the same setup in a custom window undermain_screen_contentwas empty (measurement record).{vanilla, code (source), code (binary), measured, conflict}(Source: VN 27 uses, NB-09 (own control), CN tests B26 and B27 (global fallback), CN Zeqa regression, 2026-11-19 Windows 1.26.65.1) - [BND-25]
source_control_namelookup: by default breadth-first first match from the screen root,resolve_sibling_scopebreadth-first from the parent (including the parent itself, the cause of BND-20), andresolve_ancestor_scopethe nearest ancestor of the same name. Hidden subtrees are searched too. If names collide, the one closer to the root wins.{code (source), code (binary)}(Source: NB-09 (the three scopes), CN tests B20 and B25 (search order)) - [BND-36] A view binding reads its own control when
source_control_nameis empty (BND-24), and otherwise looks up in one of the default, sibling (resolve_sibling_scope) and ancestor (resolve_ancestor_scope) scopes (BND-25). Turning both scopes on leaves an error and acts as the sibling scope. Ifsource_property_nameortarget_property_nameis missing, each gives aMust define a … property name in the binding!error. A collection binding withoutbinding_collection_namegives the errorMust define a collection name for the binding!.{code (binary)}(Source: NB-09) - [BND-34] Comparing a subtraction result directly in the same expression like
(not ((A - B) = 'z'))flipped true and false. Putting it first in a#variablewith a view binding and comparing with(not (#variable = 'z'))was correct. Split the steps as in EXP-06.{measured}(Source: DF)
Bindings and variables
- [BND-12] In definitions the pack owns directly (definitions of a new namespace, redeclared definitions), a
$variablecan be used insource_property_name. Example:"source_property_name": "$visible_binding".{working pack, measured}(Source: AP 4.2, BC-facts) - [BND-13] Inside a subtree inserted into a vanilla tree with
modifications, a$variablecannot be used in a binding'ssource_property_name(all 6 variants gaveMust define a source property name). Ordinary property substitution such as$captionintextworks in the same place. So for inserted trees, make a separate definition with the binding names hardcoded as literals.{measured}(Source: BC-facts) - [BND-14] There is a record that passing a value such as a factory row index to a derived definition as a
$variableand using it in the base's binding broke the binding and discarded the whole array. Whether vanilla'sfactory_variables(COL-15 in the collections and factories chapter) solves this problem was not measured.{measured, inferred}(Source: BC-S9, VN) - [BND-21] Inside a button state control, state variables can decide creation itself:
"ignored": "$default_state"on a child that should show only on hover. Vanilla also uses"ignored": "$hover_state"(2),"visible": "$default_state"(3) and"visible": "($hover_state or $pressed_state)"(5). It means the variable expression of INP-09 works forignoredtoo.{vanilla, unverified}(Source: BW-btn, VN) - [BND-33] A
$variableput in as part of asource_property_nameexpression is substituted. The value goes in as one string and is not parsed again as an expression. Unquoted values (('#' + $v)with"$v": "hover_text",($skip * #hud_subtitle_text_string)with"$skip": "%.20s") worked on the chest screen and in the HUD (HXC). With quotes inside the value,(#form_button_text - $m)with"$m": "'§0§3§r'"left the marker buttons hidden (DF), most likely because the quotes went in as characters and did not match (inference). So put only unquoted values in variables, and do not write an expression with no#property. For using one expression in every cell, see Binding expression caching."$bt": "#v"put into an expression as($bt)was read as the property#vand gave its value, and a variable whose value is an expression ("$us": "('%' + $tid + '%')") gave empty when used in an expression (measurement record). That empty value may be the rule that drops an expression without a#property at load (BND-42); the log of that test was not checked.{measured}(Source: HXC, DF, BW-title, 2026-11-19 Windows 1.26.65.1) - [BND-42] A view binding expression without a
#property is dropped at load even if it contains$variables. Whensource_property_nameis an expression made only of constants and$variables, the errorJSON UI parse failure: Must define a source property name in the binding!is logged and the binding does not work.(.25),(1 * .5),('R' + $cut)concatenating"$cut", and the form((20.0 - 15) / $max)using only"$max": 20.0all did this, and the target stayed at its default (#alphaopaque, label text empty). Adding one#property made it work: with"#z": "R"inproperty_bag,(#z + $cut)gaveRabc, and with"#z": 0,(((20.0 - 15) / $max) + #z)on#clip_ratioclipped by 0.25. To compute from variable values only, put"#z": 0for a numeric expression or"#z": ""for a string expression inproperty_bagand add+ #z. When the expression is passed as a variable value ("$cexpr": "((20.0 - 15) / $max)"received and used insource_property_name), the$maxinside that expression was not found,Expected variable not found in ancestor tree: '$max'was logged first, and the binding was dropped with the same error. The "expression without#" of BND-05 includes expressions that contain$variables.{measured}(Source: 2026-11-24 Windows 1.26.65.1)
BND-42 was measured with probe labels inserted into the Windows 1.26.65.1 HUD.
Engine properties: commonly used binding targets
| Property | Meaning | Evidence |
|---|---|---|
#visible | Visibility (default true) | VN, all sources |
#text | Label text ("text": "#text") | VN |
#texture, #texture_file_system | Image texture path | VN server_form.json:173 |
#clip_ratio | Image clip ratio (0~1) | VN 33 uses, BA |
#collection_length | Number of cells a factory or collection creates | VN 89 uses, BC-S11 |
#size_binding_x/y, #anchored_offset_value_x/y | Size and position (table in chapter 3) | VN, BC-S12 |
#item_id_aux | Item renderer input (id x 65536 + aux) | VN, AP, BC-facts |
#toggle_state | Toggle state | BC 4.2 |
#propagateAlpha | Whether to propagate the parent's alpha to children | VN hud_screen.json:3568, AP |
- [BND-15]
propagate_alphacan also be changed with the binding#propagateAlpha. The vanilla HUD root receives the global#hud_propagate_alphaas#propagateAlpha. With parentalpha: 0+ conditional propagation you can make "only a particular message transparent".alphaitself is not propagated to children by default (LAY-33).{vanilla, working pack}(Source: VN hud_screen.json:3567, AP 4.5, BW-doc) - [BND-16]
binding_name_overridemoves an engine name into your own property. Examples:#hud_title_text_stringto#text,#form_button_contentsto#collection_length.{vanilla}(Source: VN hud_screen.json, server_form.json:138, BW-intro) - [BND-17] Vanilla builds the binding name itself as a variable expression:
"$toggle_state_binding_name": "('#' + $dropdown_name)". It is a way to read various data with one template.{vanilla}(Source: VN ui_common.json:1126, storage_management.json:1325) - [BND-18] Value preservation (latch). Put
"#saved": ""in theproperty_bagof a size-0 panel, and copy the source only at the moment visibility changes with{ "binding_name": "#src", "binding_name_override": "#saved", "binding_condition": "visibility_changed" }. If you set the#visibleof this panel to "when the new value contains the keyword (EXP-07) and differs from the saved value", it shows for one frame at the moment the condition matches and hides again because the condition turns false right after saving. An outside label reads#savedwithsource_control_name.property_bagis separate per instance, so several of the same component do not mix. It is used to keep "the last title containing my keyword" in the HUD title channel (HOST-14) even when other titles arrive. In a chest slot it worked in game: withcollection_indexon the latch panel,#hover_textcopied to#savedby a collection binding, and#visibleset to "the new value is not empty and differs from the saved value", the latch followed name changes and kept the last name when the slot became empty. It also worked on the HUD title channel: with#hud_title_text_stringcopied and#visibleset to "containsJUCand differs from#saved", the titlesJUC one,other,JUC two,plain againin that order gave the saved valuesJUC one,JUC one,JUC two,JUC two(measurement record). Use this latch also to show data slots of a chest (label text, alive_horse_rendererid and so on).#hover_textis emptied for a moment on every slot press (HOST-50); the latch does not store the empty value, so titles and models stopped flickering (measured 2026-11-28 on Windows 1.26.65). Avisibility_changedlatch, however, kept the old name when its ancestor page was hidden at the moment the slot name changed, even after the page was shown again. A latch that did not freeze under a hidden ancestor sets#visibleto(not ((#hover_text = '') and (#item_id_aux > 0)))and then copies#hover_textto#savedwith a collection binding usingbinding_condition: visible. It hides only while the name is empty and an item is there, and reads again every time it is shown. A latch placed under a control that hides by the name (an icon whose#visiblecomes from the name) is never shown and never reads the name, so put the latch beside the reading control.resolve_sibling_scopestarts searching at the reading control's parent, so copies of one definition under one parent all found the first copy's latch. Passing the latch name in a variable named per definition ($sg_latch_<definition>) made each copy find the latch beside it; a shared variable name let an outer copy's value override the latch names of inner definitions (SG, 2026-12-02 Windows 1.26.65.1). This latch does not remove the brief window disappearance on a drop press (INP-46).{measured}(Source: BW-title, VNvisibility_changed7 uses, CPR, SG, 2026-11-18 Windows 1.26.65.1, 2026-11-28 Windows 1.26.65, 2026-12-02 Windows 1.26.65.1) - [BND-27] Boolean targets (
#visible,#enabled,#toggle_state, etc.) accept only JSON booleans. Binding the global string'false'as is to#visibledoes not hide it. Going through an expression ((#flag = 'false')) makes it a boolean. The boolean read in the Windows 1.26.65.1 code uses the value only when its type is boolean, and for null, integer, float or string it uses the property's default. It does no truthiness conversion (asBool). So integer 0 and float 0.0 also cannot hide#visibleor turn off#enabled. In the Windows 1.26.65.1 HUD, a label with"#z": 0inproperty_bagand the view(#z * 1)on#visiblewas shown, and a label with(#z = 1)was hidden. Float 0.0 and#enabledwere not measured. Make an integer value boolean with a comparison such as(#n > 0).{measured, code (source), code (binary)}(Source: CN, 2026-11-24 decompilation, 2026-11-25 Windows 1.26.65.1) - [BND-28] Constant expressions in a
property_bagliteral are computed ("#n": "(1 + 2)"becomes 3). A parent'sproperty_bag_for_childrenis merged into descendants' bags but does not overwrite values the descendants have. The Windows 1.26.65.1 code is the same: for each member value ofproperty_bagandproperty_bag_for_childrenit calls the property value resolver, which computes a constant expression starting with(, looks up and inserts a$namevalue, and unwraps a__stringobject such as$container_titleinto itsvaluestring (HOST-19).{code (source), code (binary)}(Source: CN tests B32 and B33, 2026-11-24 decompilation) - [BND-29] Text that starts with
##, like"text": "##text", is a literal, not a binding. An unbound"text": "#name"is drawn as empty text.{code (source)}(Source: CN test L08)
Passing values to renderers and the HUD title factory
The rules of this section and BND-41 were measured on Windows 1.26.65.1 on 2026-11-19~2026-11-20. The HUD title factory tests are recorded in actor_portrait_renderer section 4, and the rest were measured in the test window juc_tester.json of the measurement add-on json-ui-claims (measurement add-on). The code evidence is the Android 1.26.52.3 and Windows 1.26.65.1 decompilation.
- [BND-38] Bindings cut integers to 32 bits. When a binding expression reads an integer, only the low 32 bits remain:
-8589934591in theproperty_bagwas read as1, and2147483648as-2147483648. A view binding that copies a value without any expression ("source_property_name": "#src", or from another control withsource_control_name) also delivered a 64-bit integer truncated, soactor_portrait_rendererdid not draw that entity, while90copied the same way worked. Do not move 64-bit integers such as entity ids through bindings; write them as JSON integers in theproperty_bag(FILE-47).{measured, code (binary)}(Source: 2026-11-20 Windows 1.26.65.1, 2026-11-20 decompilation) - [BND-39] A view binding target written without
#("target_property_name": "rotate_y","scale_x","translate_x") is written to that key of the control'sproperty_bag, and custom renderers read the value. Writing to"#rotate_y"had no effect onactor_portrait_renderer. Use a renderer key as the target exactly as it is written in theproperty_bag.{measured}(Source: 2026-11-20 Windows 1.26.65.1) - [BND-40] Script API
ScreenDisplay.updateSubtitleupdates the#hud_subtitle_text_stringbindings of the controls made byhud_title_text_factorywithout the title being sent again. When the subtitle changed to 0, 45 and 90, the rotation, translation and scale bound to it followed. Sending the title again creates the control anew (ANI-12), so send values that change often in the subtitle.{measured}(Source: 2026-11-20 Windows 1.26.65.1)
Expressions in binding_name
- [BND-26] An expression binding
{"binding_name": "(expression)", "binding_name_override": "#t"}gives the controller's original answer to#tin the bag and the expression result to the component. If another view reads#t, it sees the original answer, not the expression result. To share the result, compute it with a view binding and put it in a new property. The Windows 1.26.65.1 code confirms only the first half: in the binding update loop, for a global entry the controller writes the original value to the target name key and the apply function reads that key. Inside this loop there is no call that computes the expression of a global entry (expression evaluation exists only for view entries), and where the expression result is used was not found in the code.{code (source), code (binary)}(Source: CN test B08, 2026-11-24 decompilation) - [BND-41] A constant expression in
binding_nameis computed at parse time."binding_name": "('#title' + '_text')"with"binding_name_override": "#text"showed the title (it becomes a simple binding of the result#title_text). If the result is not text starting with#, nothing is registered andMust define a binding name!is logged (code). An expression containing#makes one entry for each#namein it, and without an override that#nameitself is the target (code)."binding_name": "(not #title_text)"without an override, drawn with"text": "#title_text", still showed the title: the original value is written to#title_text(BND-26).{measured, code (binary)}(Source: 2026-11-20 Windows 1.26.65.1, 2026-11-20 decompilation)
Global binding names the engine answers
These are from the Windows 1.26.65.1 client code ({code}) and HUD label measurements ({measured}). For the measurements labels were inserted with insert_back into the root_panel of ui/hud_screen.json, and whether a name exists was told with the property_bag pair below. Function addresses are in native-notes/.
- A screen controller answers by running a
switchon the hash of the binding name. With no matching entry it asks the base controller, the binding map the controller registered, and the child controllers in that order, and if nobody answers it returns false and writes no log{code}. - A binding that gets no answer writes nothing to its target. The binding update loop asks the controller for each entry and, regardless of the answer, calls the apply function with the target name (the override if there is one). The apply function takes that key from the control's bag, and a missing key is null. If the target is an engine property it uses that property's default: the boolean read of
#visiblereturns true when the value is not a boolean or is missing.#enabledand#focus_enabledare also true and#alphais 1.0. If the target is a name that is not an engine property (#probeand so on), the apply function does nothing and the key keeps the value written inproperty_bag{code}. - So a binding that gets no answer, bound directly with
binding_name_override: "#visible", looks true, and a missing name cannot be told from a true one. The nonexistent name#re8_nonexistent_bindingwas shown when bound this way{measured, code}. For the same reason, a control with a static"visible": falsebecomes visible when a binding with no answer is bound to#visible. The measurement with#re9_nonexistent_bindinggave this (BND-09){measured, code}.
Whether a name exists is told with two labels that differ only in their property_bag default. The candidate binding (the #cand slot below) is received into #probe, a key that is not an engine property, and a view binding copies #probe to #visible. Put the global entry first and the view entry after it (the loop runs in array order).
"probe_f": {
"type": "label", "text": "F",
"property_bag": { "#probe": false },
"bindings": [
{ "binding_name": "#cand", "binding_name_override": "#probe" },
{ "binding_type": "view", "source_property_name": "#probe", "target_property_name": "#visible" }
]
},
"probe_t": { "...": "same as probe_f, only property_bag is { \"#probe\": true }" }
| Candidate state | F (default false) | T (default true) |
|---|---|---|
| No such name (the controller does not know it) | hidden | shown |
| Exists, value true | shown | shown |
| Exists, value false | hidden | hidden |
- With a missing name
#probekeeps theproperty_bagvalue, and with an existing one the controller writes a boolean into#probe. To see the value itself, give a third label"#probe": "M"inproperty_bagand copy('V' + #probe)to#text: a missing name showsVM, an existing oneVtrueorVfalse{measured, code}. - For an integer or string binding, put
"#probe": -12345inproperty_bagand copy(not (#probe = -12345))to#visible. A missing name hides and an existing one shows (unless the value happens to be -12345). A non-boolean value copied to#visibleas is becomes the default true, so the comparison is needed{code}. - A name inside a collection (
#shield_is_activeand so on) is always missing as a global. Build the same pair with a collection binding{code}.
Values measured in the HUD (Windows 1.26.65.1, 2026-11-24, #is_not_riding and #descend_description on 2026-11-25, keyboard, standing in a world). The first three are calibration {measured}.
| Binding | F | T | ('V' + #probe) | Verdict |
|---|---|---|---|---|
#is_using_gamepad | hidden | hidden | Vfalse | exists, false (keyboard) |
#is_riding | hidden | hidden | Vfalse | exists, false (standing) |
#re9_nonexistent_binding | hidden | shown | VM | missing |
#vr | hidden | hidden | Vfalse | exists, false |
#show_cursor | shown | shown | Vtrue | exists, true |
#inventory_button_enabled | shown | shown | Vtrue | exists, true |
#hud_visible_centered | shown | shown | Vtrue | exists, true |
#tts_enabled | hidden | hidden | Vfalse | exists, false |
#focus_wrap_enabled | hidden | shown | VM | missing in the HUD |
#safezone_inner_top | hidden | hidden | Vfalse | resolves (the M is gone), but it concatenated as false instead of a number, and the meaning is unknown |
#is_not_riding | shown | shown | Vtrue | exists, true (standing). Vfalse in a boat |
#descend_description | - | - | DM (prefix D) | does not resolve in the HUD (both on the ground and on scaffolding). See below |
Values measured with the same pair inside a server form (Windows 1.26.65.1, 2026-11-25, inserted before long_form_scrolling_content of server_form.json, screen name third_party_server_screen, keyboard) {measured}.
| Binding | F | T | ('V' + #probe) | Verdict |
|---|---|---|---|---|
#is_using_gamepad | hidden | hidden | Vfalse | exists, false |
#re9_nonexistent_binding (calibration) | hidden | shown | VM | missing |
#safezone_inner_top | hidden | hidden | Vfalse | resolves, but concatenates as false as in the HUD (meaning unknown) |
#tts_enabled | hidden | hidden | Vfalse | exists, false |
#gamepad_helper_visible | hidden | hidden | Vfalse | exists, false |
- In the code
#focus_wrap_enabledis not a binding name a controller answers but a target property handled by the apply function (default true on a control that has a focus part). The HUD controller and the base controller have no case for this name, so bound as a global it is missing{code, measured}. - There are 53 base bindings that every screen inherits: about 30 controller icon strings (
#controller_face_down_iconand others), 6 button descriptions (#button_a_descriptionand others), input state (#is_using_gamepad,#gamepad_helper_visible,#keyboard_helper_visible,#gamepad_cursor_visible,#gesture_control_enabled,#init_selection_wheel_input_mode), 8 safe zone values (#safezone_inner_top,#safezone_outer_leftand others), reading helpers (#tts_enabled,#tts_dialog_title,#tts_dialog_body),#close_button_visibleand#service_image_*. The wiki lists only#gesture_control_enabled. The server form, HUD, chat, sign and trading controllers use this base, so a server form can read them too. Inside a server form#is_using_gamepad,#tts_enabledand#gamepad_helper_visibleexisted and were false, and#safezone_inner_topconcatenated asfalseas in the HUD (table above). In the HUD#is_using_gamepadwas hidden (false) with a keyboard{code, measured}. - There are 139 HUD global bindings, of which 71 are specific to the HUD. The wiki lists a little over 20, and about 50 are used by vanilla but are not in the wiki (
#is_armor_visible,#paper_doll_visible,#is_riding_bubbles,#survival_horse_hearts,#hotbar_grid_dimensions,#interact_visible,#is_spectator_mode,#scoreboard_sidebar_visible, 14#layout_customization_*and others). Only the installed vanilla has#editor_chat_visible,#editor_chat_offsetand#editor_chat_layout_activefor the editor chat{code}. - Names were found for five of the hashes whose names were unknown, by combining identifier pieces from the executable. For
#descend_description(HUD global, string) and#is_not_riding(HUD global, boolean) the behavior of the case code matches the name: the first writeshudScreen.tooltip.scaffoldingDescend(English "Hold to Descend") when its condition holds and an empty string otherwise, and the second writes the inverse of the same mount query as#is_riding{code}.#controller_select_icon(base, string) and the HUD collection namesright_helper_collectionandleft_helper_collectionwere adopted to fit their neighbors (the icon group such as#controller_start_icon, and the pairs with the HUD globals#right_helper_countand#left_helper_count){code, inferred}. Vanilla UI does not use the first two. In the Windows 1.26.65.1 HUD#is_not_ridingexisted and was true while standing and false in a boat (#is_ridingwas false and true at the same times){measured}.#descend_descriptiondrawn withtextwas empty, and theproperty_bagpair ("#probe": "M",('D' + #probe)) gaveDMboth on the ground and on scaffolding, so it did not resolve in the HUD. But on the screen where the player crouched down onto scaffolding the vanilla descend hint did not show either, so it is not certain that the "standing on scaffolding" condition held, and whether the name is used only on other screens or with touch input is unknown{measured}.#controller_select_iconand the two collection names were not measured in game. The condition of#descend_descriptionlooks like standing on scaffolding{inferred}. One more HUD global hash (constant false) has the candidate#vr_ridingonly at chance-match level and is on hold. - There are 36 HUD collection bindings, and the collection names include
hotbar_items,boss_bars,controls_toggleandoption_items. Most are item slot names (#item_id_aux,#item_durability_*and others), and the HUD-specific ones are#bossName,#bar_visible,#bar_color,#progress_percentage,#hotbar_hint_visible,#slot_selectedand others{code}.
There are 6 names that vanilla UI never uses.
| Name | Kind | Value read |
|---|---|---|
#vr | HUD global | Constant false. Hidden while standing, and the property_bag pair also gave exists, false {code, measured} |
#is_riding | HUD global | Whether the player is riding a mount. Hidden while standing and shown while riding after /ride @s start_riding. Usable {measured} |
#show_cursor, #inventory_button_enabled | HUD global | The code says boolean (a HUD field, the inverse of a model query). Measured with the property_bag pair, both exist and were true while standing in a world. Opening chat hides the HUD, so a state in which they become false was not seen {code, measured} |
#shield_is_active | HUD collection (hotbar_items) | The code says true when the item in the slot is a shield and the player is using that same item. Bound as an ordinary global binding it looked like a nonexistent name. Bound as a hotbar collection binding with a shield in slot 1, the cell was shown while slot 1 was selected, both while blocking with right click and while not. It was hidden when slot 2 was selected. It was closer to whether the selected slot holds a shield than to whether the player is blocking {measured} |
#show_item_pickup | HUD collection (hotbar_items) | The value differed per slot. A cell appeared only for slots with content and stayed shown for over a minute on the bread and emerald slots. The shield slot was shown right after the first /give but hidden after the world was reopened. Whether it means the duration of the pickup display was not settled {measured} |
A collection binding is bound with binding_type: "collection" and binding_collection_name: "hotbar_items" and read in the cell label of the grid that is built for each slot.
Proposed rules
The rules below lack evidence or are not adopted yet. Check the evidence before using them.
- [BND-30] (proposal) There is a generator (AsaJS) that does repeated calculation (counting string length, a Newton square root) by attaching two view bindings to the same target, "initialize" and "itself + increment". The method relies on the premise that a view binding rewrites only when its source changes and the chain loops until it converges (the Cinnabar finding CN-36). The iteration limit and per-frame processing are not checked, so it is not used as a recipe. Self-reference itself worked on Windows 1.26.65.1. On a zero-size HUD panel, a view binding writing
((#st * (1 - (#on + #off))) + #on)back into#stheld the state 1, 1, 1, 0, 0, 1, 1 for the titlesXON a,other,plain,XOFF b,other2,XON c,other3, with no hang and no log error (record). Not checked: whether the iterative calculation that increments by 1 (string length, square root) reaches the final value, and how many frames it takes.{code (source), measured, unverified}(Source: ASJ, CN, 2026-11-19 Windows 1.26.65.1)
Facts added by community reports (community)
(Source: private research) All are at the report level.
- Principle:
globalto take as is,viewto compute. - If you attach several bindings to the same target, they are not merged. Merge them into one expression. A binding that reads and writes the same name works for a numeric toggle state: a view binding that reads
#stfrom theproperty_bagand writes it back into#stheld its state on the HUD, with no hang and no log error (Windows 1.26.65.1, BND-30, record). A form that keeps appending to a string (from#lento#len) is reported to loop and grow memory, and was not measured. Which entry wins is set by the code (Windows 1.26.65.1): the update loop writes and applies each entry in array order, so within one update the last entry that actually wrote a value wins. A later entry the controller does not answer writes nothing and only re-applies the earlier value, so it does not win (global binding names the engine answers). resolve_ancestor_scopeappeared in 1.21.130. On Windows 1.26.65.1 it read the ancestor without an error (BND-01).resolve_sibling_scope: truerestricts the search: the sibling was read and the cousin was empty.- Putting
onceon the factory and grid length bindings of a big form reduces lag and ghost buttons. But keep the#visibleof a layout chosen by title atalways(BND-31). Thealwaysandvisibleconditions were also effective on the view binding of a layout#visible(BND-31, BND-32). - The preserved title (latch) pattern works. Value preservation of BND-18 is the usual method for the HUD title channel and it also worked on Windows 1.26.65.1 (BND-18). The
data_controlusually goes at the root. In the measurement, a latch inside a parent hidden via the action bar still recorded a title sent while hidden (measurement record). property_bag_for_childrenentered the stable release around 2026-05 (BND-28).- A nonexistent binding name (
#item_aux_id, the correct one is#item_id_aux) returns theproperty_bagdefault without an error. The code is the same: when no controller answers, nothing is written to the target and no log is written. The target key keeps theproperty_bagvalue, and ifproperty_baghas no such key the engine property's default is used (#visibleand#enabledtrue,#alpha1.0) (global binding names the engine answers). In a Windows 1.26.65.1 measurement the key that received the nonexistent name#re9_nonexistent_bindingkept itsproperty_bagvalueM. Bound directly to#visibleit looks true, so being shown does not prove that the name exists. Tell whether a name exists with theproperty_bagpair of "Global binding names the engine answers" above. Copy binding names from vanilla files or the JSON UI Dumper. - A mobile crash report: writing
andinline insidebinding_namekilled mobile. Do calculations in a view binding.
Conflict verdicts (related to this chapter's rules)
| ID | Topic | Claim and evidence | Verdict |
|---|---|---|---|
| C-43 | A binding expression without # | Measurement discards the whole bindings array, Cinnabar only that one binding | Open: follow BND-05 |
Items that need measurement
- Whether variables can be passed to cells with
factory_variables(COL-15, BND-14). - How many frames the initialize and self-increment bindings take to count string length (BND-30).
- Why
#safezone_inner_topconcatenates asfalseinstead of a number. It was the same in a server form. - Whether
#descend_descriptionresolves while standing on scaffolding (it did not resolve in the HUD, but it is not certain that the condition held), and whether#controller_select_iconexists.
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
repo-guide | JSON UI comprehensive guide (this repository) (guide/) | This project's material | 2026-11-13 | |
repo-survey | JSON UI material survey (this repository) (survey/) | This project's material | 2026-11-13 | |
private-research | Private research (-) | - | 2026-11-13 | |
bedrock-wiki | Bedrock Wiki | CC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository) | 0930b39 | 2026-11-13 |
ms-learn | Minecraft Creator documentation (Microsoft Learn) | CC BY 4.0 (documentation), MIT (code) | a9fd1c0 | 2026-11-13 |
bedrock-samples | Mojang bedrock-samples | Minecraft EULA applies, (c) Mojang AB. All rights reserved | 15701fa9 (guide baseline 46ba6ea) | 2026-11-13 |
cinnabar | Cinnabar (json-ui crate) | PolyForm Noncommercial License 1.0.0 (confirmed in the repository LICENSE). Used only to check behavior and as an implementation reference; the original text is not copied | ceb0fb6 (analysis baseline, clone HEAD df826f5) | 2026-11-13 |
bedrock-core | bedrock-core UI (@bedrock-core/ui) | MIT (confirmed in the repository LICENSE, Copyright 2026 bedrock-core) | aee2bbd (analysis baseline, clone HEAD 51d5cf2) | 2026-11-13 |
advancementpack | AdvancementPack (r4isen1920) | MIT (confirmed in the repository LICENSE, Copyright 2024 r4isen1920) | 0a79929 (analyzed v4.2, researched 2026-10-20) | 2026-11-13 |
asajs | AsaJS | GPL-3.0 (confirmed in the repository LICENSE) | 9f884dc | 2026-11-13 |
netease-docs | NetEase developer documentation, UI chapter (mirror EaseCation/netease-modsdk-wiki) | No LICENSE in the mirror repository, the original is NetEase's work. Facts only, rewritten | 6dd1233 | 2026-11-13 |