Images and animation
Images are drawn by image controls. The basics are stretching one texture (fill), repeating it (tiled), stretching while preserving corners with 9-slice, and showing only part of it (clip_ratio). What the engine draws directly (item icons, player models, hearts) is the custom type + renderer, collected separately in the Renderers category. What changes over time is animation (anim_type).
The smallest examples
Example 1. Image. texture is a path from the pack root without an extension. With uv and uv_size you can use only part of a big texture.
"icon": { "type": "image", "texture": "textures/ui/my_icon",
"size": [ 16, 16 ], "uv": [ 0, 0 ], "uv_size": [ 16, 16 ], "bilinear": false }
Example 2. 9-slice. Put textures/ui/my_panel.json next to textures/ui/my_panel.png. The 4 corner cells stay as they are and only the center stretches.
{ "nineslice_size": 4, "base_size": [ 16, 16 ] }
Example 3. Progress bar. Bind #clip_ratio (0.0~1.0) and decide which side it is cut from with clip_direction. Keep the binding condition at always or always_when_visible (6 uses each in vanilla). To make 0~1 from an integer value (0~100), use a dot-leading real literal like .01 (EXP-27).
"bar": { "type": "image", "texture": "textures/ui/bar_fill", "size": [ 100, 8 ],
"clip_direction": "left", "clip_pixelperfect": false,
"bindings": [
{ "binding_type": "view", "source_property_name": "(#percent * .01)",
"target_property_name": "#clip_ratio", "binding_condition": "always" } ] }
Example 4. A slide in, wait, slide out animation (see the code of 9.3 below). An animation control has anim_type instead of type, and is attached with anims or referenced directly in a property value as @namespace.name.
Image property table (Bedrock Wiki, MS Learn)
This is organized from the Sprite table of the Bedrock Wiki JSON UI Documentation and the MS Learn ui_element table (both list texture, uv, tiled, keep_ratio, bilinear, fill, grayscale, clip_pixelperfect and nine_slice_*).
| Property | Type | Meaning |
|---|---|---|
texture | string | Path from the pack root (for example textures/ui/White) |
allow_debug_missing_texture | boolean | Draws a missing-texture image when the texture is absent. Default true |
uv, uv_size | [u, v], [width, height] | The start point and size of the region of the texture to use |
texture_file_system | string | Where to read the texture from. InUserPackage (default), InAppPackage, RawPath, RawPersistent, InSettingsDir, InExternalDir, etc. |
nineslice_size | integer or [x0, y0, x1, y1] | 9-slice. Corners fixed, the rest stretches |
tiled | true/false/"x"/"y" | Repeats if the control is bigger than the texture. tiled_scale is the scale of the repeat unit |
clip_direction, clip_ratio | left/right/up/down/center, 0.0~1.0 | The side clipping starts from and the ratio. Without clip_direction nothing is clipped, and the default clip_ratio is 1.0 (ANI-48). The wiki says to bind a #*_ratio binding to #clip_ratio with the always condition, and that the furnace progress arrow and fuel image work this way |
clip_pixelperfect | boolean | Clips exactly pixel by pixel where possible. Default true, rounding the clip down to texels (ANI-49) |
keep_ratio | boolean | Keeps the ratio when resizing. Default true |
bilinear | boolean | Bilinear interpolation when resizing. Default false |
fill | boolean | Stretches to the control size. Default false |
grayscale | boolean | Draws in grayscale |
force_texture_reload | boolean | Reloads when the texture path changes |
base_size | [width, height] | Base size of 9-slice |
The nine_slice_left/right/top/bottom of the MS Learn table (including the spelling buttom) are names that do not appear in this project's exhaustive vanilla search (they resemble names in the China edition documentation, and the international edition uses the .json file approach, DBG-27).
Easing and animation types
The values and arguments of anim_type (Bedrock Wiki Intro): alpha (real number, opacity), offset ([x, y], position relative to the anchor), size ([width, height]), flip_book (integer, an image that changes frames one at a time), uv (array, UV position), color (RGB 0.0~1.0), wait (number, wait), aseprite_flip_book (sprite sheet) and clip.
The full list of easing (wiki): linear, spring, in_quad, out_quad, in_out_quad, in_cubic, out_cubic, in_out_cubic, in_quart, out_quart, in_out_quart, in_quint, out_quint, in_out_quint, in_sine, out_sine, in_out_sine, in_expo, out_expo, in_out_expo, in_circ, out_circ, in_out_circ, in_bounce, out_bounce, in_out_bounce, in_back, out_back, in_out_back, in_elastic, out_elastic, in_out_elastic. Of these, vanilla uses only 14 (ANI-10).
Animation properties (wiki table): anim_type, duration (seconds), next (the animation to follow after it ends), destroy_at_end, play_event, end_event, start_event, reset_event, easing, from, to, initial_uv, fps, frame_count, frame_step, reversible (run backwards after ending), resettable, scale_from_starting_alpha, activated.
Images
- [ANI-01] The main properties of
image(vanilla use counts):texture,uv/uv_size(40),tiled(44),keep_ratio(45),bilinear(50),fill(48),color,alpha,clip_direction(left21,down3,up1,right1),clip_ratio,clip_pixelperfect(21),grayscale(1),force_texture_reload(6),zip_folder(3). There are alsoallow_debug_missing_texture(4) and the axis values oftiled(ANI-17).{vanilla}(Source: VN, BW-doc) - [ANI-02] A texture path can be assembled with a variable expression:
"texture": "('textures/my/bg/' + $tab_bg)". At runtime, put the path into a#texturebinding with a view expression:('textures/my/frames/' + #frame).{working pack, vanilla}(Source: AP 4.9, BA 3.1, VN server_form.json:173) - [ANI-03] A progress bar binds
#clip_ratio(0~1) and decides the clipped side withclip_direction.clip_ratio,clip_directionandclip_pixelperfectare not in the official schema but are properties vanilla uses. To make a 0~1 decimal from an integer value, use a dot-leading real literal like(#v * .01).(#v / 100)is integer division (EXP-18, EXP-27). On Windows 1.26.65.1,(#v * .01)with#v50 drew half the bar. The engine clamps the value to [0, 1] and reads a non-number as 0.0 (ANI-50). Vanilla gives the#clip_ratiobindingbinding_conditionofalways(6) oralways_when_visible(6).{vanilla, measured, code (source), code (binary)}(Source: VN 33 uses, BC-facts, BA 3.2, BW-doc, CN, 2026-11-24 Windows 1.26.65.1 measurement and decompilation) - [ANI-04] For 9-slice, put a
.jsonof the same name next to the texture file and writenineslice_size([left, top, right, bottom]or one value) andbase_size. Vanilla UI JSON does not usenineslice_sizeas a literal property and uses it once through a binding (#banner_nineslice_sizeto#nineslice_size) (LAY-27). For a repeating background, give the image"tiled": true(LAY-28, 44 uses in vanilla).{working pack, vanilla}(Source: BA chapter 5, AP 4.9, VN) - The
base_sizeof a 9-slice sidecar is two values,[width, height]. The vanilla hotbar end texture sidecar listing 4 values was reported as a bug (MCPE-170343, 1.19.81, 1.20.0.23). Whether the engine ignores 4 values or uses the first two is unknown.{docs} - On some block screens of the pocket UI the scrollbar and top bar do not follow resource pack textures (MCPE-152801, MCPE-154347). The screens appear to use fixed textures.
{single report} - [ANI-17]
tiledaccepts not onlytrue(23) but also"x"(8) and"y"(12), which repeat on one axis only. In the code"xy"and"yx"also repeat on both axes. The repeat unit scale istiled_scale(3).{vanilla, code (binary)}(Source: BW-doc Sprite table, VN, 2026-11-24 Windows 1.26.65.1 decompilation) - [ANI-22] An image chooses how to draw in the order 9-slice,
clip_ratio,tiled,fill,keep_ratio, stretching.clip_pixelperfect(default on) clips in original pixel units.colorcan be#rrggbbas well as[r,g,b,a].{code (source)}(Source: CN) - [ANI-34] The client drew a grayscale PNG translucently (the window showed through the gray frame). Texture optimization tools convert gray images to grayscale, so keep a pack's PNGs as RGB or RGBA.
{measured}(Source: DF) - [ANI-48]
clip_ratioclips only whenclip_directionis present. An image withclip_ratio: 0.5and noclip_directionwas not clipped. An image with onlyclip_direction: "left"andclip_ratioomitted drew nothing, because the default is 1.0.clip_directiontakesleft,right,up,downandcenter. Withclip_pixelperfect: false,left0.25 showed the left 75%,down0.5 the lower half andcenter0.5 the middle 50%. So the part that remains is on theclip_directionside.{measured, code (binary)}(Source: 2026-11-20 Windows 1.26.65.1 measurement and decompilation) - [ANI-49]
clip_pixelperfectdefaults totrueand rounds the clip edge down to texels of the texture. With texturetextures/ui/White, the ANI-48 images withoutclip_pixelperfectshowed only a 1 GUI wide strip on the left forleft0.25, only a 1 GUI row at the bottom fordown0.5, and nothing forcenter0.5. For a bar that shows a ratio by stretching a small texture, giveclip_pixelperfect: false(Example 3 in the images and animation chapter).{measured, code (binary)}(Source: 2026-11-20 Windows 1.26.65.1 measurement and decompilation) - [ANI-50] A
#clip_ratiovalue is read as a float, clamped to [0, 1] and then written to the image. In the code integers and floats give their value, booleans give 1.0 for true and 0.0 for false, and a missing key or a non-number such as a string gives 0.0. So 2 is clamped to 1.0 and an image with a direction disappears, and a negative value becomes 0. On Windows 1.26.65.1, atextures/blocks/emerald_block80x5 bar (clip_direction: "left", full drawn width 320 px) given(#v * .01)with#v50 drew 160 px, half.(((20.0 - 15) / $max) + #z)("$max": 20.0,#z0), 0.25 fromproperty_bagand a static"clip_ratio": 0.25were all 240 px (0.25 clipped, 75% left). A ratio of 0, static or bound, drew one square the height of the bar (20x20 px, the whole texture) at the center instead of the bar. The cause is unknown. This differs from the record where 0 looked like a full bar withtextures/ui/White, butWhitecould not be checked the same day, so whether it depends on the texture was not settled. An expression of constants only without a#property ((.25)) had its binding dropped (BND-05).{measured, code (binary)}(Source: 2026-11-24 Windows 1.26.65.1 measurement and decompilation)
ANI-48 and ANI-49 are code read by decompiling the native client (Windows 1.26.65.1, partly Android 1.26.52.3) and checked in the Windows 1.26.65.1 game (2026-11-20). The test window is juc_tester.json in the add-on addons/json-ui-claims. 1 GUI was 4 client pixels. ANI-50 is code read from a decompilation of the Windows 1.26.65.1 client and checked on the HUD in the same game version (2026-11-24). The probe pack is addons/re9-probes, and the measurement record is in section 6.8 of claim measurements.
Image texture keys
- [ANI-52] On an
imagewithuvoruv_size, a"texture:<integer 1 or above>"key wins overtexture. With several numbers, the largest wins whatever the key order.texture:0, a non-numeric suffix such astexture:x, andtexture:Non an image with neitheruvnoruv_sizeare ignored. The value may use a variable, and a missing path draws the missing texture pattern. The key comes from pack merging. When a later pack overridestexturewith an object that also hasuvoruv_size, the engine stores the value intexture:<pack index>instead oftexture. So"texture:99"on an image in a lower pack keeps its texture when a higher pack overridestexture, with or withoutuv."texture:1"survived a higher pack that overrode onlytexture, and lost to a higher pack that overrode it together withuvanduv_size.{measured, code (binary)}(Source: 2026-12-03 Windows 1.26.65.1 measurement and decompilation)
Renderers (custom)
What the engine draws through "type": "custom" and renderer (item icons, player models, gradients, progress bars and so on) is collected in the Renderers category.
Animation
"anim_slide_in": { "anim_type": "offset", "easing": "out_back", "duration": 0.5,
"from": [ "100%c + 40px", 20 ], "to": [ 0, 20 ], "next": "@my_toast.anim_wait" },
"anim_wait": { "anim_type": "wait", "duration": 4.5, "next": "@my_toast.anim_slide_out" },
"anim_slide_out": { "anim_type": "offset", "easing": "in_back", "duration": 0.5,
"from": [ 0, 20 ], "to": [ "100%c + 40px", 20 ], "destroy_at_end": "hud_title_text" }
// Usage: "anims": [ "@my_toast.anim_slide_in" ] or "alpha": "@my_toast.anim_fade"
- [ANI-08]
anim_typevalues (vanilla counts):alpha54,offset42,flip_book34,wait30,size7,color3,aseprite_flip_book2,uv1. The wiki and Cinnabar (the 1.26.50 engine enum) also listclip, making 9 kinds (ANI-20). Vanilla uses it 0 times. In the Windows 1.26.65.1 code aclipanimation writes the easing value to the image'sclip_ratio. It was not measured in game.{vanilla, code (source), code (binary)}(Source: VN, CN, 2026-11-24 Windows 1.26.65.1 decompilation) - [ANI-09] Animation fields:
from,to,duration,easing,next(a reference to the next animation),destroy_at_end,play_event,end_event,reset_event,reversible,resettable,looping, and for flipbooksinitial_uv,frame_count,frame_stepandfps. In the codeinitial_uvis the first uv of aflip_bookoraseprite_flip_bookproperty reference.{vanilla, code (binary)}(Source: VN per-field tally, 2026-11-24 Windows 1.26.65.1 decompilation) - [ANI-10] For
easing, prefer the values vanilla uses:linear,out_cubic,in_expo,in_quart,in_quint,out_expo,in_sine,in_out_back,out_sine,out_bounce,out_back,in_out_expo,in_out_circ,in_bounce. Of the 32 easings in the external list, 18 are not in vanilla.in_backis used by BA. These 32 are the same as the wiki list, and all 14 of vanilla's are among them.{vanilla, working pack}(Source: VN, MJ 4.2, BA chapter 6, BW-doc) - [ANI-11] Attach an animation with
"anims": [ "@ns.name" ]or reference it directly in a property value ("alpha": "@hud.anim_title_text_alpha_in"). You can also attach an animation of another namespace to a vanilla element.{vanilla, working pack}(Source: VN hud_screen.json:2272, AP 4.5) - [ANI-12] Every time a factory newly creates a control, the animation plays from the beginning again. That is why a toast slides in each time a title is sent. In the code too, creating a control creates the
animscomponent and stores the current time.{working pack, code (binary)}(Source: BA chapter 6, BW-intro, 2026-11-24 Windows 1.26.65.1 decompilation) - [ANI-13] If you shrink the height of a vanished item to 0 with a
sizeanimation, the next items of a stack panel rise smoothly.{working pack}(Source: AP 4.5) - [ANI-14] The value of
destroy_at_endin vanilla uses the name of the control the factory created (hud_title_text), the name of its base definition (chat: child namechat_item, valuechat_grid_item) and a variable ($toast_control). Measured on the HUD title factory, the control the factory created was named after thecontrol_idskey (hud_title_text), and a child name written in the JSON (the part before@, as injuc_d_inst_a@...) was ignored.destroy_at_enddestroyed only withhud_title_text(about 1 s later), not with that child name or the definition name. A factory control without a destroying animation stayed after the title ended (measurement record). Also stop accumulation with the factory count limit (max_children_size). In the Cinnabar reconstruction,destroy_at_enderases the nearest among that control and its ancestors whose engine-assigned control name equals the value, and the chat controller gives the lines it creates the namechat_grid_item(ANI-21). Then it matches the value in vanilla chat (chat was not measured).{vanilla, measured, code (source), inferred}(Source: VN hud_screen.json:949 and 2213, AP 4.5, CN, 2026-11-18 Windows 1.26.65.1) - [ANI-15] A flipbook icon is made with
"uv": "@ns.anim"(anim_type: aseprite_flip_book) +"uv_size"+ the Aseprite JSON next to the texture (frames[].frame,duration). In Aseprite, export the JSON in the Array format (Hash is said not to work). In the code the engine readsframesonly as an array (frames[].duration,frame.x,frame.y) and has no code that reads the Hash (object) format. The framewandhare not read. The texture and JSON have the same name without an extension, andaseprite_flip_bookis applied only to theuvof an image.{vanilla, working pack, code (binary)}(Source: VN 2 uses, AP 4.7, BW-ase, 2026-11-24 Windows 1.26.65.1 decompilation) - [ANI-16] The vanilla title animation times come in as engine variables (
$title_fade_in_time,$title_fade_out_time). It appears that the/title timesvalues are reflected here.{vanilla, inferred}(Source: VN hud_screen.json:2170 and 2185) - [ANI-18] For a control inside a grid, an animation chained with
nexthas a bug where after the first animation the duration is divided by the number of items and it speeds up (exceptflip_book). For grid items, use a repeating animation as one stage or uselooping. The 2026-11-24 decompilation found no code that causes this speedup.{unverified}(Source: BW-dyn, 2026-11-24 Windows 1.26.65.1 decompilation) - [ANI-19] Additional animation fields vanilla uses:
start_event(1),scale_from_starting_alpha(4),activated(2). On the control side:animation_reset_name(26),disable_anim_fast_forward(21). In the codescale_from_starting_alphais a boolean of an alpha animation, and when true the start value is the current alpha. No place was found where the animation parser readsstart_eventoractivated.{vanilla, code (binary)}(Source: BW-doc Animations table, VN, 2026-11-24 Windows 1.26.65.1 decompilation) - [ANI-20] There are 9 animation types:
alpha,clip,color,flip_book,aseprite_flip_book,offset,size,uvandwait(the 1.26.50 enum).{code (source)}(Source: CN) - [ANI-21]
destroy_at_enderases the nearest among the control that has that animation and its ancestors whose engine-assigned control name equals the value. That name is usually the child name written in the JSON (the part before@), but a control created by a factory gets thecontrol_idskey as its name (ANI-14).{code (source)}(Source: CN) - [ANI-37] To replay an animation from the start in an open screen, make that control get built again. In a
control_idsfactory whose#collection_lengthcomes from aproperty_bagdictionary lookup (COL-22, COL-23), every change of the marker in the key value (the slot item name) built the control again and itsanimsplayed from the start. Turning#visibleoff and on did not replay it.{measured}(Source: E2048)
Aseprite sprite animation (the Bedrock Wiki original)
aseprite_flip_book makes animation from a sprite sheet exported from Aseprite (or the free alternative LibreSprite). Below is the wiki original (CC BY 4.0). It has the same content as the rules of ANI-15 (Array format, same-named files).
Excerpt: Aseprite Animations · docs/json-ui/aseprite-animations.md · Bedrock Wiki · License CC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository) · Commit 0930b39Creating an Animation in Aseprite
Suppose you have a series of frame images named "frameimage" with sequential numbers from 1 to 5. Import the first image, and Aseprite will automatically recognize the other images with the same name but different numbers. It will then place them in the correct order and create an animation.
Use the arrow keys to navigate through all frames and the "Enter" key to play or pause the animation. Press the "Tab" key to open the timeline and select individual frames. Right-click a frame in the timeline to access various settings.
To export the animation, use the shortcut "Ctrl + E" or navigate to "File" -> "Export to Sprite Sheet". In the output settings, select the Output file and the JSON Data. You'll see a dropdown menu with Hash and Array options. Ensure the Array option is selected, or the export will not work properly.
You should now have two files: the SpriteSheet image and a JSON file. Ensure both files have the same name but different extensions.
Using Aseprite Animations in JSON UI
The
aseprite_flip_bookanimation type can only be used for theuvproperty in an element of the typeimage.{"image_element": {"type": "image","texture": "textures/wiki/ui/my_sprite_file","uv_size": [32, 32],"uv": "@example_namespace.image_uv_animation"},"image_uv_animation": {"anim_type": "aseprite_flip_book","initial_uv": [0, 0]}}Set the
texturefield to the path of the exported files without the extension. Theuv_sizefield should be set to the width and height of a single frame.
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.
| Abbreviation | Material |
|---|---|
VN | Exhaustive 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-rules | bedrock-core (@bedrock-core/ui 0.12.1, MIT) and the author's in-game measurement records (aee2bbd) |
BA, BA-original | BedrockAdvancements 2.0.3 (All rights reserved, only techniques carried over) |
AP | AdvancementPack v4.2 (MIT) |
MJ | mcbejsonuimasterAI (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-ids | Bedrock 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-run | Cinnabar (Rust code reconstructing the 26.30 native client) and the results of this project running its evaluator. If it differs from game measurement, follow measurement |
NB | Engine behavior analysis of the Android 1.26.52.3 native client library (level code) |
DF | Measurement on Windows 1.26.52 with the research server (a structure that draws several screens with one server form) |
ASJ, SLB | AsaJS analysis, StarLibV2 analysis (both GPL-3.0, only techniques rewritten in English) |
MS | The modal form multiselect survey |
NE | NetEase (China edition) developer documentation |
E2048 | Mobile 1.26.63 measurement with the entity inventory 2048 test pack (2026-11-15). The setup is in section 8.2 of Building menu screens from an entity inventory |
CPR | Windows measurement with the chest screen probe pack built to check community reports (research repository community-probe v1.0.0, 2026-11-16) |
UKP | Touch input device measurement with the renderer property_bag probe pack (research repository ui-key-probe v1.0.0~v1.0.1, 2026-11-17) |
UII | Windows measurement with the item trim text URL image test pack (research repository url-item-image v1.0.1~v1.0.2, 2026-11-16) |
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
repo-guide | JSON UI comprehensive guide (this repository) (guide/) | This project's material | 2026-11-13 | |
bedrock-samples | Mojang bedrock-samples | Minecraft EULA applies, (c) Mojang AB. All rights reserved | 15701fa9 (guide baseline 46ba6ea) | 2026-11-13 |
bedrock-wiki | Bedrock Wiki | CC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository) | 0930b39 | 2026-11-13 |
ms-learn | Minecraft Creator documentation (Microsoft Learn) | CC BY 4.0 (documentation), MIT (code) | a9fd1c0 | 2026-11-13 |
private-research | Private research (-) | - | 2026-11-13 | |
bedrock-core | bedrock-core UI (@bedrock-core/ui) | MIT (confirmed in the repository LICENSE, Copyright 2026 bedrock-core) | aee2bbd (analysis baseline, clone HEAD 51d5cf2) | 2026-11-13 |
advancementpack | AdvancementPack (r4isen1920) | MIT (confirmed in the repository LICENSE, Copyright 2024 r4isen1920) | 0a79929 (analyzed v4.2, researched 2026-10-20) | 2026-11-13 |
cinnabar | Cinnabar (json-ui crate) | PolyForm Noncommercial License 1.0.0 (confirmed in the repository LICENSE). Used only to check behavior and as an implementation reference; the original text is not copied | ceb0fb6 (analysis baseline, clone HEAD df826f5) | 2026-11-13 |
netease-mcdocs | NetEase developer documentation (mc.163.com) | NetEase's work. No redistribution, facts only, rewritten | 2026-11-13 |