Skip to main content

Input, buttons and toggles

Input controls are the parts of a screen that receive the user's actions. This page covers three things.

  • Buttons (button): connect a press to a button ID with button_mappings. Button IDs are split into ones the engine understands (button.form_button_click, button.menu_exit, etc.) and ones the pack names arbitrarily. An ID the engine knows triggers an action (submitting a server form, closing), and an unknown ID does nothing but can still be used for in-UI events such as the animation play_event.
  • Toggles (toggle): buttons with an on/off state. A child control is defined for each of the 8 states (on and off x default, hover, locked, locked hover), and only the one matching the current state is drawn. The toggle state is read by other controls through #toggle_state.
  • Input boxes and focus: the targets keyboards and controllers point to are set with the focus_* properties.

The smallest examples​

Example 1. Making a close button with a vanilla button template. Reuse the vanilla template (common_buttons.light_text_button) with variables instead of building it yourself. If you give $pressed_button_name a button ID the engine knows, that action happens.

"close_button@common_buttons.light_text_button": {
"size": [ 64, 32 ],
"$button_text": "Close",
"$pressed_button_name": "button.menu_exit"
}

Example 2. Showing and hiding an image by toggle state. The toggle's $toggle_view_binding_name becomes the name of the toggle control, and other controls read its state with source_control_name and #toggle_state.

"my_toggle@common_toggles.light_text_toggle": {
"size": [ 64, 32 ], "$button_text": "Toggle",
"$toggle_name": "my_toggle",
"$toggle_view_binding_name": "my_toggle_state" },
"my_image": { "type": "image", "texture": "textures/items/apple", "size": [16, 16],
"bindings": [ { "binding_type": "view",
"source_control_name": "my_toggle_state",
"source_property_name": "#toggle_state",
"target_property_name": "#visible" } ] }

The Bedrock Wiki explanation (Buttons and Toggles) and button_mappings​

Below is the original "Buttons and Toggles" of the Bedrock Wiki (bedrock-wiki 0930b39) (CC BY 4.0). It shows how to make toggles and buttons with vanilla templates, a content button that shows hover text, and playing an animation by button ID.

Excerpt: Buttons and Toggles · docs/json-ui/buttons-and-toggles.md · Bedrock Wiki · License CC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository) · Commit 0930b39

Toggles

In this example, we will reference ui/ui_template_toggles.json

{
"our_toggle@common_toggles.light_text_toggle": {
"size": [
64,
32
],
"$button_text": "Click me!",
"$toggle_name": "wiki_toggle", // Required, but it has no effect unless a hardcoded toggle name is used.
"$toggle_view_binding_name": "wiki_toggle_state" // The toggle name that allows us to retrieve data.
}
}

And that's it! You now have a working toggle. You can test it by adding it to any screen.

Additionally, you can utilize toggles to control the visibility of UI elements.

{
"our_toggle@common_toggles.light_text_toggle": {
"size": [
64,
32
],
"$button_text": "Click me!",
"$toggle_name": "wiki_toggle", // Required, but it has no effect unless a hardcoded toggle name is used.
"$toggle_view_binding_name": "wiki_toggle_state" // The toggle name that allows us to retrieve data.
},
"our_image": {
"type": "image",
"texture": "textures/items/apple",
"size": [
16,
16
],
"offset": [
0,
20
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "wiki_toggle_state", // // The toggle name specified in the $toggle_view_binding_name
"source_property_name": "#toggle_state", // The binding data that returns the toggle state as a boolean value
"target_property_name": "#visible"
}
]
}
}

Buttons

Generally, buttons have limited functionality, as they are primarily used in hardcoded instances, such as navigating to a screen or opening a dialog.

In this example, we will reference ui/ui_template_buttons.json

{
"our_button@common_buttons.light_text_button": {
"size": [
64,
32
],
"$button_text": "Click me!",
"$pressed_button_name": "button.menu_exit" // Required, you can put in any global button names or hardcoded button names.
}
}

And that's it! You now have a working button, clicking on it exits you to the current screen you're in. You can test it by adding it to any screen.

Advanced Buttons and Toggles

Hover Text

In order to make buttons that shows a text when you hover into it, we will need to use Content Buttons.

In this example, we will reference ui/ui_template_buttons.json and ui/ui_common.json

{
"our_button@common_buttons.light_content_button": {
"size": [
18,
18
],
"$button_content": "namespace.our_button_content_panel", // Reference our content element.
"$pressed_button_name": "button.menu_exit" // Required, you can put in any global button names or hardcoded button names.
},
"our_button_content_panel": {
"type": "panel",
"controls": [
{
"our_image": {
"type": "image",
"texture": "textures/items/apple",
"size": [
16,
16
]
}
},
{
// You can use any element but we'll just use the hover text when you hover an item in-game.
"our_hover_text@common.hover_text": {
"ignored": "$default_state", // Required, this will make the element not visible if the button is in a default state or isn't hovered.
"property_bag": {
"#hover_text": "" // You can put your text here. It doesn't support localizing so if that's what you are looking to do, create a custom hover text.
}
}
}
]
}
}

Play Animation

If you want to play an animation when you click a button, you have to use $pressed_button_name in your animation's play_event property.

For example:

{
"example_animation": {
"anim_type": "offset",
"easing": "linear",
"duration": 2,
"from": [
0,
0
],
"to": [
-50,
0
],
"play_event": "button.example_button_id"
},
"example_button@common_buttons.light_text_button": {
"$pressed_button_name": "button.example_button_id", // use this button id in play_event property of your animation
"$button_text": "Play Animation",
"size": [
80,
20
]
},
"example_label": {
"type": "label",
"text": "Example Text",
"anims": [
"@namespace.example_animation" // add your animation here
],
"anchor_from": "top_right",
"anchor_to": "top_right"
}
}

The structure of button_mappings (Bedrock Wiki Intro and MS Learn)​

button_mappings is an array of objects, and an item has from_button_id (the button ID that comes in as input), to_button_id (the ID to treat as actually pressed), mapping_type and the optional input_mode_condition (the same as the MS Learn ui_element reference table). If from_button_id is omitted, "pressing this control" itself is the input.

mapping_typeMeaningVanilla count
pressedWhen the control is pressed by click or touch599
focusedWhen the control received hover or focus first (for example confirming with Enter)145
globalWhen that key is pressed anywhere while the control is on screen536
double_pressedWhen pressed twice20
"sample_button@common.button": {
"$pressed_button_name": "button_id",
"button_mappings": [
{ "from_button_id": "button.menu_ok", "to_button_id": "$pressed_button_name", "mapping_type": "focused" },
{ "from_button_id": "button.menu_select", "to_button_id": "$pressed_button_name", "mapping_type": "pressed" },
{ "from_button_id": "button.menu_up", "to_button_id": "$pressed_button_name", "mapping_type": "global" }
]
}

The mapping between button IDs and keys is in the INP-21 table (the wiki original). The wiki also lists controller mappings: button.controller_select X/A, button.menu_secondary_select Y, button.menu_exit and button.menu_cancel B, button.menu_up/down/left/right D-pad. It recommends supporting several input methods together. The input_mode_condition table of MS Learn has empty values, so follow INP-02 for values (vanilla tally: gamepad, gamepad_and_not_gaze, not_gamepad).

Buttons​

  • [INP-01] A button specifies per-state child controls with default_control, hover_control, pressed_control and locked_control. Usually, rather than building one yourself, you reuse a vanilla template (common_buttons.light_text_button, etc.) with variables such as $pressed_button_name and $button_text. {vanilla} (Source: VN default_control 34, hover_control 42, pressed_control 36, locked_control 18 uses, VN server_form.json:211)
  • [INP-02] An item of button_mappings has from_button_id, to_button_id, mapping_type (pressed 599, global 536, focused 145, double_pressed 20), and optionally input_mode_condition (gamepad, gamepad_and_not_gaze, not_gamepad) and ignored. {vanilla} (Source: VN, Appendix B)
  • [INP-03] The button IDs the engine understands are fixed per screen. {vanilla, working pack, measured} (Source: VN server_form.json:212 and 321, npc_interact_screen.json:1222, BC-S14)
Actionto_button_id
Pressing an action form entrybutton.form_button_click
Submitting a modal formbutton.submit_custom_form
NPC dialogue buttonbutton.student_button
Closebutton.menu_exit
Dropping one from a chest cellbutton.drop_one
  • [INP-04] To make a form entry pressable, give the two mappings button.menu_select -> button.form_button_click (pressed) and button.menu_ok -> button.form_button_click (focused), and put a collection_details binding on the button itself (COL-04). {code (source), working pack, vanilla} (Source: BC 4.1-(3), BA chapter 5, VN)
  • [INP-05] For a button that only detects hover (a tooltip) and does not submit, empty button_mappings or set $pressed_button_name to a value the engine does not know ("unset") and receive only focus with focus_enabled and focus_magnet_enabled. To remove the click sound, sound_volume: 0. {working pack} (Source: BA chapter 5, AP 4.8)
  • [INP-06] The visibility of a button's default, hover and pressed state controls is owned by the button state machine. Put the app's visibility gates inside the state controls or outside the button, and do not let bindings and the state machine touch the same control. {measured} (Source: BC-rules, BC 4.1-(6))
  • [INP-07] For a disabled button, overlay a disabled copy that looks the same as the real (enabled) button and show only one with the same data (binding_condition: "always"). The disabled copy must keep its disabled look even under the pointer. {code (source), measured} (Source: BC 4.1-(6), BC-rules)
  • [INP-08] Give the content layers inside state controls a higher value than the background (bedrock-core convention: background 1, caption and icon 12). {code (source)} (Source: BC 6.5-3, BC-rules)
  • [INP-09] Inside a button template, button state variables can be used in expressions: "visible": "($hover_state or $pressed_state)". {working pack} (Source: AP 4.8)
  • [INP-20] If you use a button ID in an animation event (play_event, start_event), it plays when that button is pressed: button "$pressed_button_name": "button.my_anim", animation "play_event": "button.my_anim". Vanilla also has "start_event": "button.menu_achievements" once. It is an ID the engine does not know, so nothing goes to the server. {unverified, vanilla} (Source: BW-btn, VN)
  • [INP-21] Default key mappings (wiki table): button.menu_select left click, button.menu_secondary_select right click and Y, button.menu_ok Enter, button.menu_cancel and button.menu_exit Esc and B, button.menu_up/down/left/right arrow keys and D-pad, button.menu_autocomplete Tab, button.controller_select X/A, button.menu_tab_left/right the tab key and bumpers, button.menu_inventory_cancel the inventory key. There is also from_button_id: "any" (once in vanilla, gamepad_layout_screen.json). Measured in the server form screen (Windows 1.26.65.1 and mobile, 2026-11-19): left click and a mobile tap are menu_select, right click is menu_secondary_select, Esc and the mobile back action are menu_cancel (menu_exit does not arrive), Enter is menu_ok together with chat and return, the arrow keys are menu_* together with arrow_*, [ ] are menu_tab_left/right, and E is menu_inventory_cancel. Tab did not turn on menu_autocomplete, and any did not turn on for any input. Middle click (menu_tertiary_select), numbers 1 to 9 (slot1 to slot9), Q (menu_inventory_drop), Ctrl+Q (menu_inventory_drop_all), Shift+click (menu_auto_place), T (chat), Z (mobeffects) and B (key.emote) also arrived (intercepting user input in InvUI). {measured, vanilla} (Source: BW-intro, BW-doc, VN)
  • [INP-33] There are 31 button.menu_* button IDs in the engine (including button.menu_emote_slot_0 to 3). Those not in the wiki table of INP-21 are button.menu_tertiary_select, button.menu_auto_place, button.menu_inventory_drop, button.menu_inventory_drop_all, button.menu_inventory_cancel, button.menu_alternate_tab_left and _right, button.menu_autocomplete and _back, button.menu_textcursorleft and right, button.menu_textedit_up and down, button.menu_clear, button.menu_play and button.menu_edu_play. Measured in the server form screen (Windows 1.26.65.1, 2026-11-19), menu_tertiary_select is the mouse middle click, menu_auto_place is Shift+click, menu_inventory_drop is Q, menu_inventory_drop_all is Ctrl+Q and menu_inventory_cancel is E, and Tab did not turn on menu_autocomplete (intercepting user input in InvUI). Which key the rest correspond to is unknown. {code (binary), measured} (Source: NB chapter 4)
  • [INP-22] For gamepad and arrow key focus, name targets with focus_identifier and specify the next target with focus_change_up/down/left/right. To prevent leaving, use FOCUS_OVERRIDE_STOP as the value (226 uses in vanilla). At the container level, use focus_container: true and focus_container_custom_* (other_focus_container_name, focus_id_inside). {vanilla} (Source: BW-doc Focus table, VN)
  • [INP-23] follows_cursor: true (4 uses in vanilla) makes a control follow the cursor, and draggable (vertical, horizontal, both, vertical once in vanilla) makes a control draggable when given to a control that receives input (input_panel, button) together with a button mapping. not_draggable is also accepted and is the same as giving no draggable. In a scroll view on the Windows 1.26.65.1 pause screen, a scrollbar_box with "draggable": "vertical" was sized to the content ratio and moved when dragged. A box that inherited it and overrode it with not_draggable, and a box with no draggable, both filled the whole track and did not move when dragged. A scroll box needs draggable, and not_draggable is only for turning off an inherited value. {vanilla, measured} (Source: BW-doc Layout table, VN)
  • [INP-47] text_type on text_edit_box takes three values: ExtendedASCII, IdentifierChars, NumberChars. With keyboard input on Windows 1.26.65.1, none of them filtered characters. Ab_9-x.y:Z /#$!é가 went in as typed, and the NumberChars field of the vanilla command block also took Ab_9-. For number-only input, do not rely on text_type; check the value in script after it arrives. Whether it picks the touch keyboard type was not checked. {measured, code (binary)} (Source: 2026-12-03 Windows 1.26.65.1 measurement and decompilation)
  • On iOS and Android, the on-screen keyboard not closing after submitting a JSON UI text input was fixed in 1.26.30. On earlier mobile versions this is not a pack problem. {docs} (Source: ms-learn Update 1.26.30)
  • [INP-24] The #hyperlink of a button opens only what is in the engine's allow list (116 URLs that must match literally, INP-34). Custom URLs do not open. {code (binary)} (Source: NB-08, VN #hyperlink use)
  • [INP-34] A #hyperlink opens only if it passes the engine's allow list when the button is pressed. The list is 116 URLs that must match literally (87 of https://www.minecraft.net/<language>/terms/r1~r3, 20 of https://aka.ms/…, EULA, copyright notice, account settings, etc.). Only when some condition (appears to be an edition or platform decision) is true, URLs that start with https://education.minecraft.net/, https://aka.ms/ or ms-windows-store: also pass. URLs put in by a pack or server do not open, and even a URL in the list does not open if it differs slightly. {code (binary)} (Source: NB-08)
  • [INP-31] A server form button can be turned off. If you set the button template's $pressed_button_name to a name the engine does not know (button.df_noop), pressing it did not answer the form and the hover tooltip still showed (INP-05 confirmed in a server form). Use it on buttons that merely resend the same screen, such as the chosen tab or chosen cell. {measured} (Source: DF)
  • [INP-40] always_listen_to_input is a boolean read by types that take an input component (button, toggle, input_panel, screen, scroll_view and others) and defaults to false. When true, the control goes into a separate list when it registers in the screen's input lists, and button input is delivered to the focused control, the normal list and then this list, in that order. The position check of a pressed mapping passes when the pointer is inside the control's rectangle even without hover. So even when another control takes the hover (consume_hover_events), this control gets clicks inside its rectangle. Measurement candidate: overlap a panel with consume_hover_events true on a button with this key on, and see whether the button is pressed (prediction: pressed). {code (binary)} (Source: 2026-11-24 Windows 1.26.65.1 decompilation)

INP-40 was read from a decompilation of the Windows 1.26.65.1 client (2026-11-24) and was not measured in game.

Toggles​

The 8 toggle state controls (vanilla names):

checked_control unchecked_control
checked_hover_control unchecked_hover_control
checked_locked_control unchecked_locked_control
checked_locked_hover_control unchecked_locked_hover_control
  • [INP-10] A toggle draws only one child, the one the current state points to. If it enters an undefined state (for example hover), the control disappears, so define all 8 states. {measured, vanilla} (Source: BC-S4, VN each of the 8 names 2 or more times)
  • [INP-11] For clicking to work, the toggle's own button_mappings (button.menu_select and button.menu_ok) are needed. Without them it is only drawn and cannot be pressed. On Windows 1.26.65.1 (2026-11-20) toggle_on_button and toggle_off_button were not needed: a toggle with only a button.menu_select mapping turned on with a click whether or not it had toggle_on_button. In the code, toggle_on_button and toggle_off_button are used only when enable_directional_toggling is true. The bedrock-core measurement (BC-S4, version not recorded) said these two were also needed. {measured, code (binary)} (Source: BC-S4, 2026-11-20 Windows 1.26.65.1 measurement and decompilation)
  • [INP-12] A radio group is made with toggle_name (the group name), radio_toggle_group: true, toggle_group_forced_index and toggle_group_default_selected. {vanilla, measured} (Source: VN radio_toggle_group 59, toggle_group_forced_index 210, toggle_group_default_selected 24 uses, BC chapter 5)
  • [INP-13] Tabs that need no script: make a radio toggle group and put the tab content inside each toggle's checked state control. There is no need to observe the state from outside, so nothing is sent to the server. It worked both under an action form and on a chest screen inserted with modifications. {measured} (Source: BC-S4, BC chapter 5)
  • [INP-14] Between manual radio peers that share the same forced index, state is not mirrored reliably. Each input reads its own state. A native (modal form) radio shares the group's collection scope, so read values coming from the form with a separate data source and put the radio outside that index collection item. {measured} (Source: BC 6.7-3 and 4, BC-rules)
  • [INP-15] Collapse/expand (Disclosure) is made with one toggle and a sibling that shows and hides following that toggle's state. A collapsed row pulling what is below up is thanks to the property that a stack panel gives no space to hidden children (LAY-04). {code (source)} (Source: BC chapter 5)
  • [INP-19] In vanilla toggle templates (common_toggles.light_text_toggle, etc.), $toggle_view_binding_name becomes the name of the toggle control, so another control reads the state with "source_control_name": "<that name>" and "source_property_name": "#toggle_state" (61 uses in vanilla). $toggle_name is required but is said to have no effect unless it is a name the engine knows. {vanilla, unverified} (Source: BW-btn, VN)
  • [INP-32] Vanilla common.button and common.toggle have focus_enabled on, so opening a form on a phone drew the first button in the hover state. Give every button of the form $focus_enabled: false, and radio toggles $toggle_group_default_selected: -1 and $toggle_focus_enabled: false. A radio group is bound by toggle_name regardless of parent (INP-35). A common_buttons.light_content_button placed in a chest screen also took focus, so the first one opened hovered with its name tooltip shown; the same $focus_enabled: false removed it. {measured} (Source: DF)
  • [INP-35] A radio group was bound by toggle_name, not by parent. Even when 48 toggles of the same name were split into 6 horizontal stack rows, only one was selected at a time. With toggle_group_default_selected: -1, nothing is selected at first. Windows 1.26.65.1 gave the same result: with toggles of the same toggle_name in two different parent stack_panels, clicking one unchecked the toggle in the other parent, and toggles created by a grid were also exclusive (measurement record). {measured} (Source: FFR)
  • [INP-36] Tabs and list selection inside a server form can be switched with radio toggles without going through the server. If you put that cell's detail panel inside the checked state control of a cell toggle, only the detail changes when the cell is pressed and the form does not close. Only the actions that must be told to the server (the proceed button) are form buttons (button.form_button_click). toggle_group_default_selected is a static value, so keep a separate layout per tab to open first and choose by title. {measured} (Source: FFR)

Input on the HUD, input on chests​

  • [INP-16] For a button drawn on the HUD to receive hover and scrolling, hud_screen needs always_accepts_input: true. It was confirmed only with a mouse, and whether hover works with touch or a controller was not confirmed. On mobile, buttons on a HUD with always_accepts_input: true did not respond to touch (2026-11-19, measured by the user, intercepting user input in InvUI). {working pack, measured} (Source: AP 3.1)
  • [INP-17] To use a chest screen cell like a button, map every input (click, right click, shift click, Q, double click, gamepad) to button.drop_one. Exactly one drops per press and the cursor does not change, and events arrive in the same tick in the order entitySpawn, then entityItemDrop (including the player). {measured} (Source: BC-S14)
  • [INP-18] Do not use the approach of picking up items with the cursor in a chest. An item held by the cursor is drawn directly by the engine and cannot be hidden with JSON UI. The BC record said the press disappears when the inventory is full, but on Windows 1.26.65.1 the cursor take request was sent even with a full inventory. In a setup where the server cancels it, the slot names emptied afterwards (INP-44). {measured} (Source: BC-S13, BC 4.3-(4), SG, HSB)
  • [INP-37] In the chest screen, dragging a slider does not reach the server by itself. Put one hidden slot button per step next to the slider, visible only when (#slider_value = k) (read from the slider with source_control_name), and give it a global mapping from button.menu_select to button.container_auto_place (consume_event: false). The current step then reached the server when the finger was released. A global mapping fires on a release anywhere on the screen, so the server ignores a repeated value. With several sliders on one screen the values mixed at times. The attempts and causes are in Building sliders with InvUI. {measured} (Source: IUC)
  • [INP-38] consume_event: false on a position based pressed mapping did not let a control underneath receive the press (with the hidden step buttons on top the slider did not move, with the slider on top the buttons were not pressed). With consume_event: false on the slider drag mapping, the slot button under the released finger was pressed as well, and even with the vanilla mapping the tap cell under the finger that ended a drag was pressed. The server therefore drops a tap cell press in the tick where the drag value changed {unverified} (mock only). {measured} (Source: IUC)
  • [INP-39] In chest slots with the vanilla slot mappings (including button.shape_drawing), tapping an item slot on a phone and then dragging across other slots split the items into each slot crossed, and the server read each newly crossed slot almost every tick in order. Pressing and dragging in one move placed nothing, and crossing a slot again changed nothing. When the server emptied crossed slots, the rest was split into large piles and ran out quickly; refilling the source slot mid drag ended the drag. Use it for input that takes each slot once in first crossed order (a lock pattern). The setup is in Building enhanced components with InvUI. {measured} (Source: IUC)
  • [INP-41] Quick move button.container_auto_place sends no request when all 36 slots of the player inventory it would move into are full. So a menu that receives slot presses through quick move (the slider buttons of INP-37, an Esc global mapping on a hidden slot) does nothing for a player with a full inventory. button.container_auto_place_one, which the vanilla pocket slot uses for taps, behaved the same, and with 9 empty inventory slots both sent requests (MPP). To work with a full inventory, use the hotbar swap (INP-42). {measured} (Source: SG, MPP, Windows 1.26.65.1)
  • [INP-42] Sending button.menu_select to button.slot_N (N is 1 to 9) from a chest slot button sends a request even with a full inventory. It is a swap of that slot's item with hotbar slot N-1 (destination ContainerID 28, Slot N-1), or a move when that hotbar slot is empty. Give the button a collection_details binding and the mapping { "to_button_id": "button.container_slot_hovered", "mapping_type": "pressed" }, and put it as a direct child of a stack_panel that has collection_name (focus_enabled: false works). When the server cancels the request, the hotbar stays unchanged and the window's #hover_text survives, so the same window can be pressed again (SG). In a pure add-on (local world) the swap is accepted, so a script finds the button item in the hotbar slot and puts it back. The slot names kept reading then too (HSB). If the cursor holds an item, the cursor item becomes the source. {measured} (Source: SG, HSB, Windows 1.26.65.1)
  • [INP-43] One chest slot can carry nine buttons. Give nine buttons with the same collection_index one of button.slot_1 to button.slot_9 each, and each button sends its own hotbar slot (0 to 8) as the destination, so the server or script tells the buttons apart by the destination slot. With the buttons touching each other, 36 real mouse presses sent only 19 requests; with a 6 GUI pixel gap between buttons all 36 went to the right destination. While the button item goes to the hotbar and back, one hotbar item sits in the chest slot for a moment. {measured} (Source: HSB, Windows 1.26.65.1)
  • [INP-44] button.drop_one and the cursor take button.container_take_all_place_all send requests even with a full inventory. In a setup where the server cancels these requests, a few seconds after a drop or take request the client emptied #hover_text of every slot of that window. Number bindings such as #item_id_aux, #inventory_stack_count and durability stayed, the cause is unknown, and the names came back only when a new window (a new entity) opened (SG). In a pure add-on (local world) the slot names of the same window were still there 20 seconds after 13 drops (HSB). In the same local world, seven variants (drop_one and drop_all, stacks of 1 and 16, with and without a name, with lore, and the script reverting or accepting the drop so the count went down) all kept every slot name, and the same held with phone touch (MPP). On a custom server (Dragonfly), every slot name emptied within 6 seconds even when the drop was accepted and the ItemStackResponse slot info carried the item name (CustomName) (SG). On BDS 1.26.65.1 joined as a remote server, every slot name also stayed after drops (MPP). Conversely, loading that custom server menu's resource pack, window title and slot items onto BDS as they are made the whole menu disappear within 2 seconds of a drop on BDS too (MPP; 12 long slot names were cut to fit the Script API length limit). The cause was the menu's button placement, not the server: an ancestor panel of the buttons set its own #visible from the #hover_text of slot 0 (INP-46). A menu that receives presses on the server side uses the hotbar swap (INP-42) instead of these two buttons. {measured} (Source: SG, HSB, MPP, Windows 1.26.65.1)
  • [INP-45] Conditions for a hotbar swap button to send a request (PC mouse, full inventory). Sent: pressed and focused mappings, sources button.menu_select, button.menu_ok (Enter) and button.menu_secondary_select (right click), focus_enabled on and off, consume_event true and false, the vanilla PC slot (common.container_item with container_slot_button_prototype) and pocket slot (pocket_ui_container_slot) templates with only their mappings changed, and targets button.slot_1 and button.slot_2. Not sent (the same with empty slots): a button without the button.container_slot_hovered mapping, a button with that mapping placed before the hotbar mapping with from_button_id: button.menu_select, a button without the collection_details binding, and the target button.slot_0. So the button must have the collection_details binding and a container_slot_hovered mapping without a source, and a hover mapping with a source must not come first. With phone touch (inventory with empty slots) none of the 13 hotbar swap slots sent a request. In the same screen, slots that send button.menu_select to quick move or to button.drop_one did send requests on touch, so what touch blocks is the button.slot_N target. A menu that must take touch does not rely on the hotbar swap alone. {measured} (Source: MPP, Windows 1.26.65.1, phone)
  • [INP-46] If the #visible of a button.drop_one button or one of its ancestor controls is set by a binding, pressing drop with that button turns #hover_text of every slot in the window into an empty value that does not come back. Number bindings such as #item_id_aux stay. The value of the binding did not matter: an ancestor panel set from a collection #hover_text (binding_condition always or visible, MPP), the button's own slot #hover_text, a sibling control's property received through source_control_name, and the slot #item_id_aux ((#item_id_aux > 0)) (SG) all emptied the names. In the same window, a button with no such binding on itself or its ancestors keeps the names, and emptying a slot by script alone does not empty them. Sending the ancestor binding to a property other than #visible, or changing its binding_condition to once, kept the names (MPP). A setup that hides only the button's sibling image with a #visible binding and puts no #visible binding on the button itself, and setups that set the button's #enabled or #alpha from the slot #hover_text, also kept the names after two drops in the same window (SG). So do not change the #visible of drop buttons or their ancestors by binding. Hide the button's look with the #visible of sibling controls, block the button with #enabled or #alpha, and pick pages with ignored (FILE-16, FILE-17) instead of #visible gates. If a #visible gate must be used, keep the buttons outside it or use the once condition. once is not evaluated again while the window stays open. In a window with all such bound #visible removed, every drop press still left the window, frame and background included, undrawn for a moment. A 60 fps recording showed it blank for about 120 ms; a screenshot right after the click (about 4 ms) showed no window in 4 of 4 presses, and the next one (about 230 ms) was normal. Changing all 521 controls that read #hover_text to BND-18 latches gave the same result, so this is not only slot names emptying: the screen itself is not drawn for a moment. It was the same whether the server rejected or accepted the drop, whether or not it sent slot content afterwards, and for buttons inside or outside a scrolling panel; a click on empty space did not blank. With the same button changed to button.slot_1 (hotbar swap), there was no blank (SG). Only avoiding the drop removes this brief disappearance. {measured} (Source: MPP, SG, Windows 1.26.65.1)

Slot buttons that work for a player with a full inventory, and nine buttons on one slot, are set up in Chest slot buttons with the hotbar swap. A comparison of press methods is in Comparing chest slot press methods.

StarLibV2's client search filter (SLB)​

StarLibV2 (jb-starlibv2, GPL-3.0) uses a method that filters server form buttons with the text of an input box. Only the technique is rewritten.

SLB 6. Client search filter [confirmed (structure), unverified (behavior)]​

  • Search box: inherit vanilla common.text_edit_box and give $text_box_name and $text_edit_text_control the same name (default search_field). The vanilla text input template puts "#property_field": "#item_name" in property_bag and writes the input text to its own #item_name (11 uses in vanilla, for example ui_common.json:1416).
  • Button side: a view binding source_control_name: "search_field", source_property_name: "#item_name" to #search. It shows if (#search = '') or if #form_button_text (or a range fragment from chapter 5) contains #search.
  • Initial value: put #default_search in property_bag and copy it once into #search with a binding_condition: "once" view. Then at first only buttons with that default word show, and when the user types it changes to the typed word [inferred].
  • Hidden items give up space in a vertical stack (LAY-04), so the list actually shrinks. With a grid template, empty cells remain (LAY-31).
Proposed rules

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

  • [INP-25 proposal] The text of an input box goes into the #item_name of that input box control, following the property_bag "#property_field": "#item_name" of vanilla common.text_edit_box. Other controls read it with source_control_name (the input box name = $text_box_name) and source_property_name: "#item_name". If you hide action form buttons by a containment check on this value, it becomes a search filter with no server round trip. {vanilla, working pack, unverified} (Source: VN ui_common.json:1416 and 11 other uses, SLB chapter 6). Not measured on Windows 1.26.65.1: the measurement tool's keyboard input did not reach a common.text_edit_box inside an ActionForm window, and whether the tool or the screen was the cause was not separated (measurement record).

Measurement needed: whether #item_name read by another control while typing in common.text_edit_box updates per character, and whether it is emptied when the form is reopened.

How evidence is marked and source abbreviations​

A rule carries an ID in the form [chapter abbreviation-number], and the {…} at the end is the verification level. The priority of verdicts is measured > vanilla > working pack > code > inferred, and unverified and conflict must be checked before use. C-nn is a number in the conflict table, and the value counts of VN are the tallies in the value dictionary. Rule IDs of other chapters (LAY-, BND-, HOST-, etc.) are on the corresponding pages of the same JSON UI chapter.

AbbreviationMaterial
VNExhaustive search of vanilla resource pack resource_pack/ui v1.26.50.4 (bedrock-samples 46ba6ea). VN file:line is that location
BC, BC-S1~BC-S14, BC-facts, BC-rulesbedrock-core (@bedrock-core/ui 0.12.1, MIT) and the author's in-game measurement records (aee2bbd)
BA, BA-originalBedrockAdvancements 2.0.3 (All rights reserved, only techniques carried over)
APAdvancementPack v4.2 (MIT)
MJmcbejsonuimasterAI (no license, only facts rechecked against vanilla)
BW, BW-intro, BW-dyn, BW-doc, BW-form, BW-btn, BW-type, BW-best, BW-title, BW-ase, BW-idsBedrock Wiki JSON UI documents (CC BY 4.0). Respectively Intro to JSON UI, Dynamic Content Generation, JSON UI Documentation, Modifying Server Forms, Buttons and Toggles, Type Conversion, Best Practices, Preserve Title Texts, Aseprite Animations, Numerical Item IDs
CN, CN-runCinnabar (Rust code reconstructing the 26.30 native client) and the results of this project running its evaluator
NBEngine behavior analysis of the Android 1.26.52.3 native client library (level code)
DFMeasurement on Windows 1.26.52 with the research server (a structure that draws several screens with one server form)
FFRMobile measurement of the server form factory and lag test add-on (2026-11-14). The add-on setup is in Server form research screen
ASJ, SLBAsaJS analysis, StarLibV2 analysis (both GPL-3.0, only techniques rewritten in English)
MSThe modal form multiselect survey
NENetEase (China edition) developer documentation
Sources
idSourceLicenseCommitAccessed
repo-guideJSON UI comprehensive guide (this repository) (guide/)This project's material2026-11-13
bedrock-samplesMojang bedrock-samplesMinecraft EULA applies, (c) Mojang AB. All rights reserved15701fa9 (guide baseline 46ba6ea)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
private-researchPrivate research (-)-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
starlibv2StarLibV2GPL-3.0 (confirmed in the repository LICENSE)6bf78752026-11-13