Skip to main content

Files and definitions

Concept: how UI files become one screen​

JSON UI is a way to describe game screens as data. The ui/ folder of the vanilla resource pack holds screens (hud_screen.json, inventory_screen.json, etc.), templates (ui_common.json, ui_template_*.json) and system files (_ui_defs.json, _global_variables.json), and if your resource pack adds a file with the same name and path or a new file, the game merges it with vanilla when reading (Source: bedrock-wiki, ms-learn).

There are five components.

ComponentWhat it does
FileHas one namespace. Its content is a collection of definitions
Definition (control)One key is one definition. It has properties such as type, size and controls
Inheritance @Uses another definition as the base and overrides properties
Variable $A channel for passing values to a definition. Fixed once at load and creation time
ignored, variablesDecide at creation time which controls to create and which variable values to use

The smallest working example​

This is the minimal setup to make one new screen element and attach it to the vanilla HUD. It takes three files.

// RP/ui/_ui_defs.json : register only new files
{ "ui_defs": [ "ui/my_addon/badge.json" ] }
// RP/ui/my_addon/badge.json : one namespace, several definitions
{
"namespace": "my_addon",

// A reusable template. $color has a default and can be overridden from above
"badge": {
"type": "image",
"texture": "textures/ui/white_icon",
"$color|default": [1, 1, 1],
"color": "$color",
"size": [16, 16]
},

// Inheritance: a variant that takes the definition above and changes only the color
"red_badge@my_addon.badge": { "$color": [1, 0, 0] }
}
// RP/ui/hud_screen.json : the same path as vanilla. Not registered.
// Splice it in front of root_panel with modifications (detailed rules are on the modifying vanilla screens page)
{
"root_panel": {
"modifications": [
{ "array_name": "controls", "operation": "insert_front",
"value": [ { "my_badge@my_addon.red_badge": {} } ] }
]
}
}

These three files are the background for most of the rules below. The @ in red_badge@my_addon.badge is inheritance (FILE-06), my_badge@my_addon.red_badge is the instantiation point (FILE-08), and $color|default is a variable with a default (FILE-09).

The basic explanation of the Bedrock Wiki​

Excerpt: Intro to JSON UI · docs/json-ui/json-ui-intro.md · Bedrock Wiki · License CC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository) · Commit 0930b39

The _ui_defs.json file references all JSON UI files in an array. Make sure to append the full filepath of the UI you are referencing, including the file extension (e.g. *.json), from the resource pack root folder. Only reference new UI files you have added in your pack. You don't need to reference vanilla files nor other third-party JSON UI files, as it automatically gets merged with other packs. You may append custom file extensions other than *.json, so long as the file contents are valid and written in JSON.

{
"ui_defs": ["ui/button.json", "my_ui/main_menu.json"]
}

Variables stored in _global_variables.json are constant and one-sided. And therefore, you cannot modify the default variable in one namespace to be then used by the other.

When referencing elements from different namespaces, it must have the following format:

"[element_name]@[namespace_reference].[element_name_reference]"

The wiki writes that paths outside ui/ also work, but this was not confirmed in this project (FILE-25).

The file reference of Microsoft Learn​

The MS Learn JSON UI reference (minecraft-creator commit a9fd1c0, as of 2025-02-11, marked in the document as written with AI assistance) describes the set of system files as follows (Source: ms-learn).

  • _ui_defs.json: the list of UI screen files the game loads. It is needed for custom screens to be recognized. It has one property, ui_defs (a string array), the path is relative to the resource pack root and usually starts with ui/. Example: ["ui/my_screen.json","ui/my_common_elements.json"].
  • UI screen files: consist of one namespace and definitions. One JSON key (except namespace) is one UI element, it inherits with @ as in my_button@common.button and can override $ variables.
  • _global_variables.json: global variables used by all screens. Names start with $ and colors are written as [r, g, b] or [r, g, b, a] (0.0~1.0). Example: "$button_text_color": [1, 1, 1], "$background_color": [0.2, 0.2, 0.2, 0.8].
  • Some of this reference's name and type lists (nine_slice_buttom, enum tables with empty values, etc.) differ from vanilla usage. Follow vanilla usage (LAY-01).

Rules​

JSON UI consists of JSON files in the resource pack ui/ folder. One file is one namespace, and each key in it is a control definition. A definition inherits other definitions (@) and is reused by receiving values through variables ($).

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.

File registration and loading​

  • [FILE-01] A new UI file is loaded only when its path is registered in the ui_defs array of ui/_ui_defs.json. Files at the same path as vanilla (ui/hud_screen.json, etc.) are already registered by vanilla, so they are not registered again. {vanilla, working pack} (Source: VN _ui_defs.json, AP-samples _ui_defs.json, BA, BW-intro)
  • [FILE-02] A registered file is loaded even if its extension is not .json (for example ui/adv/_screen.r4ui). {working pack} (Source: AP 4.9, BW-intro)
  • [FILE-03] A UI file is JSON that allows // and /* */ comments. {vanilla, working pack} (Source: VN header comments of all files, AP-samples)
  • [FILE-04] ui/_global_variables.json is loaded automatically without registration, and $variables defined there can be used in all files. Vanilla also does not register this file in _ui_defs.json. {vanilla, working pack} (Source: VN _ui_defs.json and _global_variables.json, AP, MJ chapter 5, BW-intro)
  • [FILE-05] A new file has one "namespace": "name". A merging file at the same path as vanilla works with vanilla's namespace even if the namespace is omitted. A checking tool flagging this as an error is a false positive. {working pack, inferred} (Source: AP-samples hud_screen.json, MJ chapter 5)
  • [FILE-25] The path in _ui_defs.json is the full path from the resource pack root to the extension. The wiki says folders outside ui/ (my_ui/main_menu.json) also work. Vanilla and this project's working packs all use only below ui/, so check before using anything outside ui/. {unverified} (Source: BW-intro)
  • [FILE-30] UI files are read with jsoncpp rules. Comments and leading zeros are fine, but trailing commas and unquoted keys are errors. When an error occurs, only the definitions read up to that point are loaded and the rest silently drop out. If the first file at the same path fails, overrides from later packs are not accepted either. Measured on Windows 1.26.65.1, a trailing comma in a definition in the middle of a file let the definitions before the error and the erroring definition load, and the definition after it dropped out. It did not drop silently: the log showed UI control reference not found: 'b'. When the middle definition had an unknown type (no_such_type), the definitions before and after both loaded and the log showed Type 'no_such_type' not ... (claim measurements). {code (source), measured} (Source: CN, 2026-11-18 Windows 1.26.65.1)
  • [FILE-31] The paths in _ui_defs.json are read once each in sorted order. If several files redefine the same definition, the last by path name wins. {code (source)} (Source: CN)
// ui/_ui_defs.json
{ "ui_defs": [ "ui/my_addon/screen.json", "ui/my_addon/toast.json" ] }

Definitions, references, inheritance​

  • [FILE-06] "name@namespace.base": { … } inherits base to make a new definition and overrides properties. A definition in the same file can also be referenced as @base without a namespace. Even if a top-level definition inherits another namespace, a short name inside it is looked up in the file namespace (43 cases in vanilla, trade_screen_pocket.json:349). As an exception, a short name under an instance that inherits another namespace inside a control array ("x@common.close_button": { "controls": [...] }) is looked up in the base namespace (3 cases in vanilla; default@close_button_panel at command_block_screen.json:1010-1038 exists only in common). Inside such a control, write ns.name (FILE-42). {vanilla} (Source: VN throughout, NE)
  • [FILE-07] A definition in another file is referenced as namespace.name. The location of a definition is decided by the file that owns it, so writing the same name in another file is treated as a different definition even in the same namespace. {measured} (Source: BC-facts)
  • [FILE-08] An item { "childname@ns.definition": { …properties to override… } } inside a control array is the instantiation point. There are properties received only at the instantiation point, like collection_index (collections and factories chapter). {vanilla, measured} (Source: VN, BC-facts)
  • [FILE-26] A namespace is said to allow a prefix (with "namespace": "wiki:main", write "x@wiki:main.element"). It is for reducing the chance of colliding with vanilla namespaces. There is no usage example in vanilla or this project's sources. {unverified} (Source: BW-best)
  • [FILE-32] If a key without @ has a dot, what is before the dot is read as the namespace ("spacer_9.5" becomes namespace spacer_9, name 5). Do not use dots in control names. "@.name" is the same file's namespace. {code (source)} (Source: CN, CN regression test Lifeboat)
  • [FILE-37] In inheritance, a property the derived definition writes replaces the base's wholesale, even if it is an object. In contrast, redeclaration in a same-path file (FILE-21) merges object values member by member. To change only part of property_bag, redeclare, and to change all, inherit. {code (source)} (Source: CN)
  • [FILE-38] A "property": null in a top-level definition erases the base value, but a null in an inline reference inside a control array leaves the base value as it is. {code (source)} (Source: CN)

Variables​

  • [FILE-09] $name is a variable. Put it inside a definition as "$x": value or pass it at the reference point. "$x|default": value is the default used only when it was not passed from above (the reference point). {vanilla} (Source: VN |default 3,419 uses)
  • [FILE-10] Variable substitution in an ordinary property works only when the whole value is a variable. "text": "$title" works, but in "text": "Title: $title" the $ is printed as is. If you need a combination, use a variable expression (FILE-11). {measured} (Source: BC-facts)
  • [FILE-11] A variable value can be a parenthesized expression. Vanilla assembles binding names, texture paths and control names with it. Example: "$toggle_state_binding_name": "('#' + $dropdown_name)". {vanilla, working pack} (Source: VN ui_common.json:1126, AP 4.3 and 4.9)
  • [FILE-12] There are variables the engine puts in beforehand. Examples: $education_edition, $is_ps4, $pre_release (platform and build), $container_title of the chest screen, and $actionbar_text and $title_fade_in_time of controls created by HUD factories. Every screen receives 88 global names, and screen-only names exist separately. The server form and NPC screens receive only the 88 global names and have no screen-only names (the section on variables the engine provides). {vanilla, measured, code (binary)} (Source: VN top values used in ignored, VN hud_screen.json:2158 and 2170, BC-facts, 2026-11-20 Windows 1.26.65.1 decompilation)
  • [FILE-13] Each item of the variables array applies that item's variables when "requires": "<$variable expression>" is true. You may also write a single object instead of an array. {vanilla, working pack} (Source: VN arrays 274 and objects 4 uses, for example realms_settings_screen.json:2557, AP 4.6, BW-doc)
  • [FILE-14] A control array can also be passed as a variable: "controls": "$target_control". It is a way to make a "child slot" in a template. {vanilla, working pack} (Source: VN 14 uses, for example persona_cast_character_screen.json:14, AP 4.2, BW-intro)
  • [FILE-15] With "child@$variable" you can mount the definition the variable points to. Vanilla also uses it 413 times with a variable passed from the reference point (for example content@$button_content). But there is a measurement that nothing was drawn in one setup of the bedrock-core chest router (referencing a host that declares $gate|default twice with different $gate), and the cause was not checked. If mounting fails, write the definition name directly. {vanilla, working pack, measured} (Source: VN 413 uses, AP 4.8, BC-facts, BW-intro)
"my_button@common_buttons.light_text_button": {
"$pressed_button_name": "button.form_button_click", // Specify template variables at the reference point
"$button_text": "#form_button_text"
}
  • [FILE-28] When using engine-provided variables ($actionbar_text, etc.) in an expression, receive them once as your own variable ("$atext": "$actionbar_text", "visible": "(not ($atext = 'x'))"). In an unnamed chest, a label with visible: "($container_title = 'container.chest')" was hidden and the label with "not" added was shown (the direct comparison is false), and a label with ($copy = 'container.chest') received through "$copy": "$container_title" was shown (true). In the code $container_title and $actionbar_text are not strings but objects with the keys __string, __rawtext and value, while $title_text and $subtitle_text are plain strings. $actionbar_text came out the same: after /title @s actionbar xyz, a ($actionbar_text = 'xyz') label was hidden and the (not ...) label was shown, and a ($copy = 'xyz') label received through "$copy": "$actionbar_text" was shown. The reason is in the code: the only place that unwraps the object into its value string is the property value resolver, and it unwraps only when the whole property value is a single $name. A $name inside an expression is looked up by the expression parser as the object itself, so a direct comparison is always false (EXP-34). The $ keys of a definition and variables values go through that resolver into the local scope, so the copy is the unwrapped string (HOST-19, HOST-48). AP's "$title_text|default": "" declaration appears to have the same effect. {measured, code (binary), inferred} (Source: BW-intro, AP 4.1, 2026-11-23 Windows 1.26.65.1, 2026-11-24 Windows 1.26.65.1, 2026-11-24 decompilation)
  • [FILE-29] Of the global platform variables the engine sets, those the vanilla 1.26.50 UI actually references: $pocket_edition, $win10_edition, $osx_edition, $console_edition, $education_edition, $is_console, $is_desktop, $is_ios, $is_ps4, $xbox_one, $touch, $pocket_screen, $desktop_screen, $is_pregame (out-of-game screens), $is_publish, $pre_release, $trial, $store_disabled, $is_holographic, $apple_os, $google_os, $microsoft_os, $nx_os and others, 34 in all. The remaining 21 of the wiki list's 55 ($game_pad, $mouse, $fire_tv, $gear_vr, etc.) do not appear in vanilla UI files. In the Windows 1.26.65.1 client code the four names given as examples are all among the 88 globals. The only input-mode name is $game_pad; there is no $gamepad (the section on variables the engine provides). Values measured on the HUD matched the code, and a pack _global_variables.json cannot override the same name the engine sets. {vanilla, code (binary), measured} (Source: BW-doc Global Variables, VN exhaustive search, 2026-11-20 Windows 1.26.65.1 decompilation)
  • [FILE-33] $variable lookup finds a fixed value first. If there is a "$x": value anywhere outside, it beats the inner "$x|default", and only when there is no fixed value is the nearest |default used. null means unset. {code (source)} (Source: CN, CN-run)
  • [FILE-36] A child key can also be a variable: in { "$slot": { …properties to override… } }, if $slot is "name@ns.definition", it is created with that name and definition. You can also give only the instance name as a variable, as in "$name_var@ns.definition". {vanilla, code (source)} (Source: VN 83 uses, for example base_tab in ui_template_tabs.json, CN)
  • [FILE-44] A variables block without requires is not applied. The engine treats a missing requires as null and skips that block. Put values that always apply outside variables as $ keys, or write "requires": true. Measured again per entry on 2026-11-24: a text: "$vt" label with "$vt|default": "DEF" and variables: [{"$vt": "NOREQ"}] showed DEF, and a text: "$vo" label with only variables: [{"$vo": "ONLY"}] drew the literal $vo and logged the warning Expected variable not found in ancestor tree: '$vo'. An entry with a true variable in requires was applied and showed REQ. {measured, code (binary)} (Source: 2026-11-20 Windows 1.26.65.1, 2026-11-20 decompilation, 2026-11-24 Windows 1.26.65.1)
  • [FILE-46] Do not use an undefined $variable in the requires of variables. On Windows 1.26.65.1, a requires with $nosuch_var, defined nowhere, piled up more than 340,000 lines of Expected variable not found in ancestor tree: '$nosuch_var' in the content log and froze the game, which had to be force quit. Declare every variable that a requires reads on that control or an ancestor, at least with |default. {measured} (Source: 2026-11-20 Windows 1.26.65.1)
  • [FILE-47] A variables block whose requires compares $subtitle_text can select a JSON integer to put in the property_bag, 64-bit integers included. $id selected with { "requires": "($subtitle_text = '-8589934591')", "$id": -8589934591 } and put in "property_bag": { "actor_id": "$id" } made actor_portrait_renderer draw that entity. A variable holding a JSON integer stays an integer when substituted into the property_bag. Bindings cut integers to 32 bits (BND-38), so put 64-bit values in this way. {measured} (Source: 2026-11-20 Windows 1.26.65.1)
  • [FILE-48] Label text starting with ( is computed as an expression. When text, or a $variable value passed to text, started with (, it was computed as an expression. (v-0)*.01, (20.0-15)/max and (.25) logged the warning JSON UI parse failure - expected a string. and the text was empty. In the code, too, the property value resolver computes a string starting with ( as a constant expression and tries again. To show text that starts with a parenthesis as is, put another character before it {inferred}. Passing it as a __rawtext object also works: text: "$raw" receiving the pack-made "$raw": {"__string": true, "__rawtext": true, "value": "(1 + 2)"} drew (1 + 2). With __rawtext removed from the same object it was not the 3 the code predicted but empty, with the same warning. The copy variable of a chest named (1 + 2) was the same (HOST-48). By the same resolution, text: "$cut" receiving "$cut": "('%.3s' * 'abcdef')" was abc (EXP-57). {measured, code (binary)} (Source: 2026-11-24 Windows 1.26.65.1, 2026-11-24 decompilation, 2026-11-25 Windows 1.26.65.1)

FILE-44~FILE-47 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. FILE-48 was measured with probe labels inserted into the Windows 1.26.65.1 HUD.

Deciding whether to create: ignored​

  • [FILE-16] If "ignored": "<$variable expression>" is true, that control is not created at all (there is no binding or layout cost either). Use only $variables in the expression, and #bindings cannot be used. ignored is evaluated in the outer (parent) scope, not in that control's own $ declarations (FILE-34). {vanilla, measured, code (binary)} (Source: VN 958 uses, BC-S8, BW-best, NB-10)
  • [FILE-17] ignored is evaluated once at the time the control is created. So to split creation by runtime data, a route for the data to come in as a variable is needed. A control created by the HUD title factory (hud_title_text_factory) receives the title string as $title_text and the subtitle string as $subtitle_text, so it can be filtered with ignored or with the requires of variables. On Windows 1.26.65.1 a requires comparing $subtitle_text selected a block (FILE-47). Inside an ordinary server form screen there is no such route, so a factory length is used to branch at creation (collections and factories chapter). Variables the factory gives enter the outer scope of the created control, so the top-level ignored of that control can read them (FILE-34). {working pack, measured, code (source), inferred} (Source: AP 4.1, BC-S8 and S11, CN, 2026-11-20 Windows 1.26.65.1)
  • [FILE-18] ignored can also be attached to an array element, like one item of button_mappings. {vanilla, working pack} (Source: VN gameplay_common.json:272, AP 4.3)
  • [FILE-19] In the variable expressions of ignored/requires, $v > 'a' was used to tell whether it is a string. $v > 0 does not tell whether it is a number: a > with a string on only one side is true when the left reads as true and the right reads as false, so a non-empty string is also true (on Windows 1.26.65.1 'abc' > 0 was true). So the item_icon of the AP original below is created even when $icon is a texture path. Filter the number-side cell when ($icon > 'a') is true (code). ignored cannot see its own $ declarations and values received at the reference point (FILE-34), so attach it to a child of the control that receives the variable. The example below is the form of the AP original. {working pack, code (source), measured} (Source: AP 4.7, CN, AP-samples _screen.r4ui:321, 2026-11-20 Windows 1.26.65.1)
// Reference point: { "icon@my_ns.icon_slot": { "$icon": "textures/items/stick" } }
"icon_slot": { "type": "panel", "size": [ 16, 16 ],
"controls": [
{ "custom_image": { "type": "image", "texture": "$icon", "ignored": "(not ($icon > 'a'))" } },
{ "item_icon": { "type": "custom", "renderer": "inventory_item_renderer",
"property_bag": { "#item_id_aux": "$icon" }, "ignored": "(not ($icon > 0))" } } ] }
  • [FILE-34] ignored does not see that control's own $ declarations. Neither the $x|default inside the definition nor the "$x": true passed at the reference point reaches its own ignored, and it reads only the value of the parent (outer) scope. Pass the gate variable to the parent and put ignored on that child (the hover_slot of vanilla focus_border and the child of AP category_tab_icon have this form). The engine evaluates ignored before that control's variables (FILE-43). Measured on Windows 1.26.65.1, with top-level "ignored": "$hide" and "$hide|default": false in the definition and "$hide" given as true, false or omitted at the reference point, all three controls were created and each time the log warned Expected variable not found in ancestor tree: '$hide' (claim measurements). {code (source), code (binary), vanilla, measured} (Source: NB-10, CN and CN-run ($x|default and reference-point values), 2 of 146 VN reference points pass variables, AP-samples, 2026-11-18 Windows 1.26.65.1)
  • [FILE-35] If the result of ignored is a boolean it is used as is, an integer is "not created if not 0", and a string is created. An unset $variable is null inside an expression, but when the whole value is like "ignored": "$x" it stays as the text $x and is created. {code (source)} (Source: CN)
  • [FILE-43] For each control the engine evaluates ignored first, and if true it does none of the remaining processing for that control, including applying variables. So values set by its own variables (including conditional variables) do not reach its own ignored (FILE-34). Putting a real number, array or object in ignored gives the error An invalid value was provided for "ignored" field.. variables accepts one object or an array of objects, and items in the array that are not objects are skipped. {code (binary)} (Source: NB-10)
  • [FILE-45] requires and ignored have no binding context, so #x evaluates to the text #x, not to null. "requires": "(#x)" applied the block and "requires": "(not #x)" did not. "ignored": "(#x = '#x')" left the control not created, and "ignored": "yes" left it created (only booleans and integers have an effect in ignored, FILE-35 and FILE-43). So requires and ignored cannot test binding values (FILE-16). {measured, code (binary)} (Source: 2026-11-20 Windows 1.26.65.1, 2026-11-20 decompilation)

Path keys and merging same-path files​

  • [FILE-20] If you use a path key like "parent/child/grandchild": { … } in a file at the same path as vanilla, it overrides only the properties of a deep vanilla control. Vanilla itself does not use this syntax (0 uses). {working pack} (Source: BA chapter 2 main_screen_content/server_form_factory, AP 4.9 recipe_unlocked_popup/input_panel/label_panel/horizontal_padding_1, BW-intro, BW-best)
  • [FILE-21] If you write a definition with the same name as vanilla in a same-path file, it is merged per property (only the properties written change). Example: specify only the two properties force_render_below and screen_draws_last on in_bed_screen. Measured on Windows 1.26.65.1, three packs each did an insert_back into main_screen_content of server_form from their own same-path file, and all three routers existed (modifications accumulate, claim measurements). On the same property the pack higher in the world pack list won: when two packs set size of chat_grid_item/chat_background to "50%" (lower pack) and "75%" (higher pack) in the same-path hud_screen.json, the chat background width was 570 (75% of the 760 parent). The game restored its own pack order on world entry, so the reverse order was not measured (record). {working pack, measured} (Source: AP-samples in_bed_screen.json and toast_screen.json, BC 6.3-9, BW-best, 2026-11-18 and 2026-11-19 Windows 1.26.65.1)
  • [FILE-22] If you redeclare a vanilla definition in a file with a different name, it is ignored. A redeclaration is valid only in a file at a path vanilla owns. {measured} (Source: BC-facts)
  • [FILE-27] If the child that a path key ("parent/child") points to does not exist, a resource pack error is left in the Content Log but the rest of the UI works normally. Path keys are the contact point that breaks first when vanilla is reworked, so if you can override the definition itself, use that. {unverified, inferred} (Source: BW-best)

property_bag​

  • [FILE-23] property_bag holds initial values of #property. It is used for defaults before a binding has written a value, for renderer input (#item_id_aux), and for routing dictionaries (screen hosts and data channels chapter). {vanilla, working pack} (Source: VN 240 uses, AP 4.7, BC 4.1)
  • [FILE-24] The size, offset and alpha values put in property_bag are not applied. Only a binding can change these three. {measured} (Source: BC-S12)

Variables the engine supplies: 88 globals and screen-only variables {code}​

This is what was read from the Windows 1.26.65.1 client code. Function addresses are not on the site; they are kept in native-notes/ in the repository. The vanilla column is how many times the vanilla 1.26.50.4 UI files use the name; 0 means vanilla never uses it.

  • The function that fills the global variable map puts in 88 names. It does not read values sent by a server or a pack. Only the input mode and the UI profile come from live values; edition values come from an edition string comparison, platform values from a build platform number comparison, and the rest from service queries or constants.
  • When this map is built (per screen, or once at startup) was not found in the code. The report that it is "evaluated only at load time" could be neither confirmed nor refuted.
  • The input mode is the value looked up by the current controller number; when there is no entry, $game_pad, $mouse and $touch are all false.
  • Constant values are the values of this Windows (GDK) build. Other platform builds may differ. $build_platform_UWP is a constant false, so this client is not a UWP build.
  • A "service boolean" is a value queried from a service object. Which service it is was not resolved.
  • A pack that branches on these names does not collide with vanilla. 24 names are never used by vanilla (the rows with 0 in the vanilla column).
NameCondition that sets the valueVanilla
$game_padthe controller's input mode value is 30
$mouseinput mode value is 10
$touchinput mode value is 213
$desktop_screenUI profile value is 047
$pocket_screenUI profile value is not 051
$education_editionedition string is edu, or the edition service flag is true202
$store_disablededition string is edu, or a service boolean11
$osx_editionedition string is osx9
$pocket_editionedition string is one of ios, pocket, Android, ChromeOS15
$is_chromebookedition string is ChromeOS0
$console_edition, $disable_gamertag_controlsedition string starts with xbox_ or playstation_, or equals switch10, 2
$xbox_oneedition string starts with xbox_3
$is_ps5edition string starts with playstation_51
$win10_editionconstant true12
$build_platform_UWPconstant false0
$is_androidbuild platform number is 17
$is_iosbuild platform number is 217
$apple_osbuild platform number is 2 or 37
$google_osbuild platform number is 1 or 46
$nx_osbuild platform number is 1248
$is_ps4build platform number is 1177
$thirdpartyconsole, $hide_xbox_live_iconbuild platform number is 11 or 125, 4
$ms_platform, $microsoft_osbuild platform number is 8 or 131, 4
$is_console, $image_picking_not_supporteddevice kind value is 2 {inferred}8, 0
$is_desktopdevice kind value is 0 {inferred}6
$pre_releaseconstant false27
$beta_build, $creator_build, $is_preview_appconstant false2, 4, 7
$is_publishconstant true27
$is_holographicconstant false2
$supports_hand_controllers, $gear_vr, $oculus_rift, $psvr, $is_living_room_mode, $is_reality_mode, $is_mobile_vr, $fire_tv, $is_settopbox, $is_windows_10_mobile, $is_win10_armconstant falseall 0
$device_must_be_removed_for_xbl_signin, $built_with_ore_ui_docs_and_testsconstant false2, 4
$supports_add_friend, $is_xboxlive_enabled, $test_infrastructure_disabled, $new_video_settings, $is_improve_input_response_platform_supportedconstant true4, 6, 9, 15, 2
$is_dynamic_textures_platform_supportedconstant true0
$is_secondary_client, $ignore_3rd_party_servers, $ignore_add_serversthe opposite of a service boolean7, 7, 5
$is_on_3p_serverchecks three fields of the connected server object (details unresolved)20
$is_creative_enabled, $is_multiplayer_enabled, $is_packs_enabled, $is_server_enabled, $is_store_enabledflag set query (entries 1, 0, 2, 4, 5)all 0
$is_seeds_enabledflag set query (entry 3)2
$top_vertical_safezone_size, $bottom_vertical_safezone_size, $left_horizontal_safezone_size, $right_horizontal_safezone_sizesafe zone calculation result (value type not identified)3, 1, 1, 1
$is_editor_mode_enabledservice boolean (editor mode)41
$is_editor_playtest_roundtripservice query result (details unresolved)11
$edu_save_to_cloud_onqueried only when the service boolean exists, otherwise false12
$edu_save_to_cloud_general_toggle_onservice boolean3
$screen_transitions_enabledfalse when a service value is off, otherwise another service boolean2
$is_pregame, $trialservice boolean (details unresolved)53, 24
$can_quit, $can_splitscreen, $requires_xbl_signin_to_play, $supports_clipboard_set, $supports_share, $supports_xbl_achievements, $file_picking_supported, $use_normalized_font_size, $is_low_memory_device, $is_realms_enabledservice boolean2, 6, 2, 16, 14, 7, 8, 2, 5, 16
$multiplayer_requires_live_gold, $vibration_supportedservice boolean0, 0
$world_archive_supportservice boolean; appears to be the same value as $file_picking_supported {inferred}1
  • Names likely to be true on this client are $win10_edition (constant true), $is_desktop, $ms_platform, $microsoft_os, $is_publish, $is_xboxlive_enabled and $new_video_settings {inferred}. Of these, labels attached to the HUD in Windows 1.26.65.1 (window 1920x1009, keyboard and mouse) showed values that all matched the code. True were $mouse, $desktop_screen, $win10_edition, $is_desktop, $ms_platform and $is_publish; false were $game_pad, $touch, $pocket_screen, $pre_release, $education_edition and $build_platform_UWP; and the misspelling $gamepad had no value (only $game_pad exists) {measured}. A boolean variable cannot be used in text (JSON UI parse failure - expected a string), so it was read with two labels, visible: "$v" and visible: "(not $v)". $touch and $game_pad with the input switched to touch or a gamepad, and the values inside a server form screen, were not measured. A pack _global_variables.json cannot override a name the engine sets. Putting "$touch": "PACK_TOUCH", "$desktop_screen": "PACK_DESK", "$pre_release": "PACK_PRE" and "$is_publish": "PACK_PUB" in the same file still made all four labels show the engine boolean, not a PACK_* string, while the name $re6_only, which the engine does not set, showed the value from the file. The engine's global variable wins {measured}. The constant-false $pre_release, $beta_build and $is_preview_app mean this build is not a preview app; the values on a preview build are unknown.
  • The reading of the build platform numbers (1 Android family, 2 iOS, 3 macOS, 4 Amazon, 8 Win32, 11 Sony, 12 Nintendo, 13 Xbox) comes from names and numbers fitting together {inferred}. What the edition string actually is on Windows is unknown.

Outside the global map, some names are put only into the variable map of one screen when the screen or a control factory is created. Of the 431 $ names extracted from the strings, only 88 are global and the rest are such screen-only names. The groups below were not in the wiki, and many of the screen assignments are inferred from name groups {code, inferred}.

Screen or factoryNames put inNotes
Pause screen$is_big_screen, $store_button_text, $platform_icons_visible, $ignore_edu_pause, $has_edu_external_link, $unlock_full_game_button_text, $achievements_button_focus, $feedback_button_focus, $profile_button_focus, $pause_menu_icon_settings_layout$is_big_screen is true when the ratio of two screen size values is below 2.0. Whether the two values are width and height is {inferred}. It is fixed once, when the screen variables are built. On the pause screen it had a value and was true at 1920x1009 (ratio 1.9), and on the HUD it had no value. The false side could not be measured because the window ratio could not be changed {measured}
Settings-family screens$is_world_create, $is_world_edit, $is_template_create, $is_realms_edit, $is_mp_host, $is_mp_client, $gamepad_supported, $keyboard_and_mouse_supported, $touch_supported, $supports_flite_tts, $platform_tts_exists, 39 *_forced_index names for tabs, 73 in all$gamepad_supported, $touch_supported and $keyboard_and_mouse_supported are values received as screen creation arguments and differ from the global $touch
Inventory-family screens$survival_index, $equipment_index, $construction_index, $nature_index, $items_index, $search_index, $crafting_index, $armor_index, $survival_layout_index, $recipe_book_layout_index, $creative_layout_index, $pocket, $show_inventory_screen_buttonThey look like tab numbers and layout selectors {inferred}
HUD title factory (hud_title_text_factory)$title_text, $subtitle_text, $title_fade_in_time, $title_stay_time, $title_fade_out_time, $subtitle_initially_visible, $title_alpha, $title_shadow$title_text and $subtitle_text are plain strings. $actionbar_text is put in by a separate function
Item name factory (item_text_factory, popup_jukebox_text), tip factory$destroy_id, $localize, $show_interact_padding, $show_survival_padding, $show_text_background, $wait_duration, $item_text_background_alphaThese factories receive them, not the title factory {code}
Chat$chat_background_opacity, $chat_font_scale_factor, $chat_text_color, $chat_line_spacing, $chat_font_type, $chat_item_lifetimeVanilla _global_variables.json also defines a default for $chat_text_color. For global names the engine value wins over the pack file value (measurement above). Whether the same holds for screen-only names was not measured. Color, background opacity, font size and line spacing are user option values, not values the add-on decides {code, inferred}
Material colors11 $material_*_color names (quartz, amethyst, lapis, copper, iron, resin, netherite, redstone, diamond, gold, emerald) and $party_blue_colorVanilla _global_variables.json defines the same names. The precedence of screen-only names is the same question as for chat, and it was not measured
Game tips13 names including $arrow_*, $tip_anchor_*, $anim_*, $game_tip_offset, $game_tip_item_lifetime
Toasts$toast_offset, $popup_*, $display_time, $transition_time
Others$chest_size, $container_size, $container_title, $use_smithing_table_2_ui, $left_tab_index_*$use_smithing_table_2_ui is the variable community reports use, and it is confirmed to be an engine-supplied value {code}

Value types and conditions of screen-only variables {code}​

This is which type of value the names in the table above receive and under which condition (Windows 1.26.65.1 code). The values are set once when the screen controller builds its variable map (whether it runs again was not read), and variables of HUD factories are recomputed each time the factory is called and a change notification goes out when the value changes. The vanilla column is omitted.

Screen or factoryVariablesType and value
HUD title$title_text, $subtitle_textString. If the HUD filter flag is on and the server sent filtered text, they receive that text, otherwise the original. $actionbar_text and title bindings such as #hud_subtitle_text_string follow the same flag. The flag turns on when two bytes of another object the HUD reads are both true, and a callback updates it when they change. That the two bytes are the profanity filter setting and its condition, and that the filtered text is the profanity filter result, are inferences from the packet field name Filtered Title Message and the setting string isFilteringProfanity {code, inferred}
$title_fade_in_time, $title_stay_time, $title_fade_out_timeReal. The title tick count divided by 20, in seconds
$subtitle_initially_visibleBoolean. True if there is a subtitle string
$title_alpha, $title_shadowThe real is the value of the user option gfx_hud_text_background_opacity, the boolean is true when that value is below 0.5. With the option at 0.6 (the default), $title_alpha was above 0.55 and below 0.7 and $title_shadow was false. With the option changed to 0.3, $title_alpha was above 0.1 and not above 0.3, and $title_shadow was true. The boundary near 0.5 was not measured {measured, code}
HUD item name$destroy_id, $wait_durationString (the item name), real (looks like the number of characters of the name x 0.04 {inferred})
$localize, $show_text_background, $show_interact_padding, $show_survival_paddingBoolean. The first two are constants false and true, the last two are HUD state
$item_text_background_alphaReal. The value of the user option gfx_hud_text_background_opacity. With the option at 0.6 it was above 0.55 and below 0.7, and at 0.3 above 0.1 and not above 0.3 {measured}
HUD actionbar$actionbar_text, $actionbar_text_background_alphaObject {"__string": true, "__rawtext": true, "value": "<text>"}, real (the value of the user option gfx_actionbar_text_background_opacity). With the actionbar option at 0.6 it was above 0.55, it stayed so when only the HUD option was changed to 0.3, and with the actionbar option at 0.3 even > .45 was false {measured}
HUD subtitles, log$subtitle_direction_left, $subtitle_direction_right, $subtitle_anchor, $subtitle_panel_anchor, $subtitle_offset, $content_log_item_lifetimeBoolean, string, array, real (constant 5.0)
Container family$container_titleObject (the same shape as the actionbar above). The actor name for an actor container, the block side name for a block container, an empty string otherwise. It was the name for a named chest, chest boat and donkey, container.chest for an unnamed chest and container.chestDouble for a large chest (HOST-19) {measured}
$localize_titleBoolean. False when a block container has a custom name, true otherwise. The named chest and the (1 + 2) chest gave false, the unnamed chest and the large chest true, and the named chest boat and donkey true (the vanilla title showed the name as is) {measured}
Data-driven container, chest$container_size, $chest_sizeInteger. The slot count of the container model. The chest screen has only $container_size: 27 for a small chest (with or without a name, and a chest boat) and 54 for a large chest, with no $chest_size (Expected variable not found in ancestor tree: '$chest_size'). The horse screen (horse_screen) has only $chest_size: 15 on a donkey with a chest, with no $container_size {measured}
$container_rows_1 to $container_rows_66 booleans. True when the row count equals that value. The row count is 1 if the slot count is below 1, the quotient of (slot count + 8) divided by 9 if below 55, and 6 above. Only $container_rows_3 was true in a small chest and only $container_rows_6 in a large chest. The horse screen has none of the six, and labels using those names in visible were all shown because the unresolved text is not an empty string {measured}
Inventory$survival_index, $crafting_index, $items_index and othersInteger constants (tab numbers)
Trading$villager_name, $second_item_slot_ignored, $left_tab_index_inventoryString (the trading villager name), boolean, integer
Pause$is_big_screen and 9 others$is_big_screen is true if the ratio of two screen size values is below 2.0. $store_button_text and $unlock_full_game_button_text are strings, the rest are booleans
Chat screen$max_messages 100, $max_text_edit_length 512Integer. The input line limit is 512 on the ordinary chat screen (chat.chat_screen) and 32768 on the developer console screen (dev_console.dev_console_screen). The two screens build the same controller with a different construction argument. It is not an editor mode or permission condition. On the chat screen $max_messages was 100 and $max_text_edit_length 512 {measured}
Book$max_page_length 256, $max_title_length 16, $screenshot_file_system, $screenshot_frame_textureInteger, string. In a writable book $max_page_length was 256 and $max_title_length 16 {measured}
Sign$sign_text_multiline, $sign_textureString. The first is a control definition name (sign.regular_sign_text_multiline or sign.hanging_sign_text_multiline), the second is a texture path per wood type. On a newly placed oak sign $sign_texture was textures/ui/sign and $sign_text_multiline the string sign.regular_sign_text_multiline. It is not a boolean, so visible: "$sign_text_multiline" is shown because the string is not empty {measured}
Chalkboard, modal$max_input_length 2000, $modal_dialog_popup_size, $no_buttons_visible, $single_button_visible, $two_buttons_visible, $three_buttons_visibleInteger, string, booleans by button count
Others$compress_hud_width (constant false), $screenshot_flash_anim_duration (1.5), $edit_mode, $default_tab, $popup_sizeBoolean, real, integer, array
  • The server form screen (server_form.third_party_server_screen) and the NPC screen (npc_interact.npc_screen) have no function that puts in screen-only variables. They receive only the 88 globals. FILE-17's "inside an ordinary server form screen there is no route for variables" is confirmed by the code {code}.

  • The screen-only values a pack can decide are indirect: the container name (entity name tag, block custom name), the trading villager name, and the title, actionbar and chat text. Chat color, opacity, font size and $*_alpha are user options.

  • Values measured after opening an unnamed chest (Windows 1.26.65.1): a label with text: "$container_title" showed the localized chest name. A label with visible: "$container_rows_3" was shown in a 3-row chest and a label with visible: "($container_size > 26)" in a 27-slot chest. A visible that compares $container_title directly was false and a visible that compares through a copy variable was true (FILE-28) {measured}. A new definition in chest_screen.json was not applied through modifications or ui_reload alone, and it appeared after the definition was rewritten as a whole including small_chest_panel_top_half and the world was reopened {measured}.

  • Values measured in the HUD (Windows 1.26.65.1, 2026-11-24): in a label built by the action bar factory, text: "$actionbar_text" was the sent text xyz, the direct comparison was false and the copy variable comparison was true (FILE-28). In a label built by the title factory, with "$a": "$title_alpha", ($a > .55) was shown and ($a > .7) was hidden, and the (not $title_shadow) label was shown {measured}. The view binding meant to read $actionbar_text_background_alpha had no # property, was dropped at load and read no value (BND-42).

  • Values measured on 2026-11-25 (Windows 1.26.65.1): among the {measured} cells of the table above, $container_title, $localize_title, $container_size, $container_rows_* and $chest_size of named containers, $title_alpha, $title_shadow, $item_text_background_alpha and $actionbar_text_background_alpha with changed options, and the chat, book and sign variables. Number variables were read with a view expression that adds a # property, such as (#z + $container_size) with "#z": "CS" (BND-42). A number variable put directly into text was empty (FILE-49).

  • Not measured: values in the server form screen, the input line limit of the developer console screen (how to open it in a retail build is unknown), filtered title text (a local world is expected to have no filtered text {inferred}), and the exact boundary at which $title_shadow changes.

  • [FILE-49] A number screen variable cannot be used directly in text. text: "$container_size" on the chest screen and text: "$max_messages" and text: "$max_text_edit_length" on the chat screen logged the warning JSON UI parse failure - expected a string. and were empty, and text: "$max_page_length" on the book screen was empty too. To show it as text, put a string key such as "#z": "CS" in property_bag and put the view binding (#z + $container_size) into #text (CS27). ('CS' + $container_size) without a # property is dropped at load (BND-42). Boolean global variables put in text gave the same warning (the section on variables the engine provides). {measured} (Source: 2026-11-25 Windows 1.26.65.1)

FILE-49 was measured with probe labels inserted into the Windows 1.26.65.1 chest, horse, chat and book screens.

Proposed rules

The rules below lack evidence or are not adopted yet. Check the evidence before using them.

  • [FILE-39] (proposal) Name siblings in the same controls array differently (the name before @). There are reports that from a version around April 2025 duplicate names cause JSON UI errors (StarLibV2 1.0.3.3), and none of the 5,084 controls arrays of vanilla 1.26.50 has a duplicate. Split a common name like padding into padding_top and padding_bottom. On Windows 1.26.65.1 the reported error does not occur. Two dup siblings in one controls array and two re9dup@re9.tl in the HUD were all created and shown side by side, and the Content Log had no line about that name (claim measurements). The code agrees: building controls walks the controls array in order and only appends each child to the parent's child list without comparing names, and the executable has no message reporting a duplicate JSON UI control name. A name lookup picks only the first sibling. So the second sibling of a duplicate name becomes an ordinary control the button does not handle. With two siblings named default_control (CD_A, CD_B in that order) on a button in the HUD and on the chat screen, both are shown with no input; when the mouse is over the chat screen button, only CD_A, first in the array, is hidden and the hover control re9ch is shown, while CD_B stays shown regardless of the button state. When the mouse leaves, CD_A is shown again. {working pack, vanilla, measured, code (binary)} (Source: SLB, bedrock-samples, 2026-11-18, 2026-11-24, 2026-11-25 Windows 1.26.65.1, 2026-11-24 decompilation)
  • [FILE-40] (proposal) A \uXXXX escape in keys and string values is decoded into the original character when read. A file converted with escapes only gets bigger and the meaning (the byte count of an expression, comparison, containment check) is the same, and anyone can revert it with a JSON parser, so it has no effect if the purpose is hiding. The small pack escape tool (JSON-Escape) writes a character outside the BMP as a five-digit escape, which breaks the character. A character outside the BMP must be written as a surrogate pair. Not checked: whether a definition that writes the "type" key and the "label" value with \u escapes works, and whether a label that writes an emoji outside the BMP as a surrogate pair is drawn. {code (source), unverified} (Source: JEN, SP)
  • [FILE-41] (proposal) The vanilla 1.26.50 UI puts one namespace in only one file. References still resolve when the definitions of one namespace are split across several files (a claim of the obfuscator JsonEncryptor). On Windows 1.26.65.1, juc_split.outer (file 1) referencing juc_split.inner (file 2) created the child (claim measurements). If there is no reason to split, keep one file per namespace. {vanilla, measured} (Source: bedrock-samples, JEN, 2026-11-18 Windows 1.26.65.1)
  • [FILE-42] (proposal) An @name without a namespace is looked up in different namespaces depending on context. There are 43 cases in vanilla where, even if a top-level definition inherits another namespace, the short name inside it is looked up in the file namespace (trade_screen_pocket.json:349), and 3 cases where a short name under an instance that inherits another namespace inside a control array ("x@common.close_button": { "controls": [...] }) is looked up in the base namespace (default@close_button_panel at command_block_screen.json:1010-1038 exists only in common). Inside a control that inherits another namespace, always write ns.name. Conflict C-55. Not checked: which one wins when both namespaces have the same name. {vanilla, conflict} (Source: NE, bedrock-samples)
  • UI file extensions packs have used: .jsonc (StarLibV2), .zip (JsonEncryptor) and .atemp (a small pack's ui/global.atemp; whether it is read in 26.x is unconfirmed) (FILE-02). A pack root config.json is an example of registration outside ui/ (a pack from the 1.20.71 era; unconfirmed after 1.21, FILE-25). Small packs use path keys to relink textures in 7 places (FILE-20). With two server form packs (Chest-UI, upgrader) that redeclare the controls of server_form.long_form turned on together, only the later pack's remains (FILE-21). {working pack, unverified}

Facts added by community reports (community)​

These are contents from community conversations in the survey period 2025-10~2026-10 that tie in with the rules above (Source: private research). All are at the report level and were not measured again in game.

  • If a red mark appears on a pack in Settings > Global Resources, it is a JSON error in a UI file. A file with an error is read only up to the error (FILE-30), so assume the latter part of that file does not exist and fix the error.
  • If you write bindings directly on a control that inherits a template, all of the base's bindings disappear (a case where scroll_grid lost its collection bindings). It is the same phenomenon as FILE-37. To add, use modifications.
  • The requires of variables is evaluated only once when the screen loads and can see only $variables. A #binding is read as text (the same conclusion as FILE-13 and FILE-16).
  • The report that ignored cannot see its own scope variables and sees only ancestor variables is the same as FILE-34.
  • The platform variables $touch, $pocket_screen and $desktop_screen are load-time values, so even if you unplug the mouse a restart is needed to change. $pocket_screen is the pocket UI profile, not "mobile" (FILE-29). $touch can be used inside a server form too: on Windows 1.26.65.1, $touch inside a server form window was defined and false, and there was no Expected variable not found log (record). The true side could not be measured on Windows.

These are places where sources disagree and that are not settled yet.

IDTopicClaim and evidenceVerdict
C-55Resolution of @name without a namespaceVanilla has both a case that looks up the base namespace under inline inheritance and one that looks up the file namespace under top-level inheritance. Cinnabar always looks up the file namespaceOpen: always write ns.name (FILE-42)

Items that need measurement​

  • \u escapes (FILE-40), registration outside ui/ and .atemp (FILE-25, the FILE-39 reinforcement).
  • Which side attaches in top-level inheritance and in inline inheritance when the same name exists in two namespaces (FILE-42, C-55).
  • The boundary near 0.5 of gfx_hud_text_background_opacity where $title_shadow changes.
Sources
idSourceLicenseCommitAccessed
repo-guideJSON UI comprehensive guide (this repository) (guide/)This project's material2026-11-13
repo-surveyJSON UI material survey (this repository) (survey/)This project's material2026-11-13
private-researchPrivate research (-)-2026-11-13
bedrock-wikiBedrock WikiCC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository)0930b392026-11-13
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13
bedrock-samplesMojang bedrock-samplesMinecraft EULA applies, (c) Mojang AB. All rights reserved15701fa9 (guide baseline 46ba6ea)2026-11-13
cinnabarCinnabar (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 copiedceb0fb6 (analysis baseline, clone HEAD df826f5)2026-11-13
bedrock-corebedrock-core UI (@bedrock-core/ui)MIT (confirmed in the repository LICENSE, Copyright 2026 bedrock-core)aee2bbd (analysis baseline, clone HEAD 51d5cf2)2026-11-13
advancementpackAdvancementPack (r4isen1920)MIT (confirmed in the repository LICENSE, Copyright 2024 r4isen1920)0a79929 (analyzed v4.2, researched 2026-10-20)2026-11-13
mcbejsonuimasteraimcbejsonuimasterAINo LICENSE at the repository root (NOTICE.md contains only third-party MIT notices). Facts only, rewritten527276c2026-11-13
netease-docsNetEase developer documentation, UI chapter (mirror EaseCation/netease-modsdk-wiki)No LICENSE in the mirror repository, the original is NetEase's work. Facts only, rewritten6dd12332026-11-13
starlibv2StarLibV2GPL-3.0 (confirmed in the repository LICENSE)6bf78752026-11-13
jsonencryptorJsonEncryptorMIT (Copyright 2024 pipa_ngry)48e78372026-11-13
repo-small-packsCollection of six small packs, abbreviation SP (small-packs/)Varies by material (no license, or includes ND). Facts only, rewritten2026-11-13
chest-uiChest-UICC BY 4.0 (confirmed in the repository License file)115d95c2026-11-13
upgraderupgraderNo LICENSE file. Facts only, rewritten0119a5a2026-11-13