Skip to main content

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_*).

PropertyTypeMeaning
texturestringPath from the pack root (for example textures/ui/White)
allow_debug_missing_texturebooleanDraws 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_systemstringWhere to read the texture from. InUserPackage (default), InAppPackage, RawPath, RawPersistent, InSettingsDir, InExternalDir, etc.
nineslice_sizeinteger or [x0, y0, x1, y1]9-slice. Corners fixed, the rest stretches
tiledtrue/false/"x"/"y"Repeats if the control is bigger than the texture. tiled_scale is the scale of the repeat unit
clip_direction, clip_ratioleft/right/up/down/center, 0.0~1.0The 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_pixelperfectbooleanClips exactly pixel by pixel where possible. Default true, rounding the clip down to texels (ANI-49)
keep_ratiobooleanKeeps the ratio when resizing. Default true
bilinearbooleanBilinear interpolation when resizing. Default false
fillbooleanStretches to the control size. Default false
grayscalebooleanDraws in grayscale
force_texture_reloadbooleanReloads 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 (left 21, down 3, up 1, right 1), clip_ratio, clip_pixelperfect (21), grayscale (1), force_texture_reload (6), zip_folder (3). There are also allow_debug_missing_texture (4) and the axis values of tiled (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 #texture binding 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 with clip_direction. clip_ratio, clip_direction and clip_pixelperfect are 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 #v 50 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_ratio binding binding_condition of always (6) or always_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 .json of the same name next to the texture file and write nineslice_size ([left, top, right, bottom] or one value) and base_size. Vanilla UI JSON does not use nineslice_size as a literal property and uses it once through a binding (#banner_nineslice_size to #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_size of 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] tiled accepts not only true (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 is tiled_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. color can be #rrggbb as 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_ratio clips only when clip_direction is present. An image with clip_ratio: 0.5 and no clip_direction was not clipped. An image with only clip_direction: "left" and clip_ratio omitted drew nothing, because the default is 1.0. clip_direction takes left, right, up, down and center. With clip_pixelperfect: false, left 0.25 showed the left 75%, down 0.5 the lower half and center 0.5 the middle 50%. So the part that remains is on the clip_direction side. {measured, code (binary)} (Source: 2026-11-20 Windows 1.26.65.1 measurement and decompilation)
  • [ANI-49] clip_pixelperfect defaults to true and rounds the clip edge down to texels of the texture. With texture textures/ui/White, the ANI-48 images without clip_pixelperfect showed only a 1 GUI wide strip on the left for left 0.25, only a 1 GUI row at the bottom for down 0.5, and nothing for center 0.5. For a bar that shows a ratio by stretching a small texture, give clip_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_ratio value 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, a textures/blocks/emerald_block 80x5 bar (clip_direction: "left", full drawn width 320 px) given (#v * .01) with #v 50 drew 160 px, half. (((20.0 - 15) / $max) + #z) ("$max": 20.0, #z 0), 0.25 from property_bag and a static "clip_ratio": 0.25 were 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 with textures/ui/White, but White could 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 image with uv or uv_size, a "texture:<integer 1 or above>" key wins over texture. With several numbers, the largest wins whatever the key order. texture:0, a non-numeric suffix such as texture:x, and texture:N on an image with neither uv nor uv_size are 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 overrides texture with an object that also has uv or uv_size, the engine stores the value in texture:<pack index> instead of texture. So "texture:99" on an image in a lower pack keeps its texture when a higher pack overrides texture, with or without uv. "texture:1" survived a higher pack that overrode only texture, and lost to a higher pack that overrode it together with uv and uv_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_type values (vanilla counts): alpha 54, offset 42, flip_book 34, wait 30, size 7, color 3, aseprite_flip_book 2, uv 1. The wiki and Cinnabar (the 1.26.50 engine enum) also list clip, making 9 kinds (ANI-20). Vanilla uses it 0 times. In the Windows 1.26.65.1 code a clip animation writes the easing value to the image's clip_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 flipbooks initial_uv, frame_count, frame_step and fps. In the code initial_uv is the first uv of a flip_book or aseprite_flip_book property 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_back is 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 anims component 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 size animation, the next items of a stack panel rise smoothly. {working pack} (Source: AP 4.5)
  • [ANI-14] The value of destroy_at_end in vanilla uses the name of the control the factory created (hud_title_text), the name of its base definition (chat: child name chat_item, value chat_grid_item) and a variable ($toast_control). Measured on the HUD title factory, the control the factory created was named after the control_ids key (hud_title_text), and a child name written in the JSON (the part before @, as in juc_d_inst_a@...) was ignored. destroy_at_end destroyed only with hud_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_end erases 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 name chat_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 reads frames only as an array (frames[].duration, frame.x, frame.y) and has no code that reads the Hash (object) format. The frame w and h are not read. The texture and JSON have the same name without an extension, and aseprite_flip_book is applied only to the uv of 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 times values 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 next has a bug where after the first animation the duration is divided by the number of items and it speeds up (except flip_book). For grid items, use a repeating animation as one stage or use looping. 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 code scale_from_starting_alpha is a boolean of an alpha animation, and when true the start value is the current alpha. No place was found where the animation parser reads start_event or activated. {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, uv and wait (the 1.26.50 enum). {code (source)} (Source: CN)
  • [ANI-21] destroy_at_end erases 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 the control_ids key 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_ids factory whose #collection_length comes from a property_bag dictionary lookup (COL-22, COL-23), every change of the marker in the key value (the slot item name) built the control again and its anims played from the start. Turning #visible off 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 0930b39

Creating 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_book animation type can only be used for the uv property in an element of the type image.

{
"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 texture field to the path of the exported files without the extension. The uv_size field 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.

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. If it differs from game measurement, follow measurement
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)
ASJ, SLBAsaJS analysis, StarLibV2 analysis (both GPL-3.0, only techniques rewritten in English)
MSThe modal form multiselect survey
NENetEase (China edition) developer documentation
E2048Mobile 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
CPRWindows measurement with the chest screen probe pack built to check community reports (research repository community-probe v1.0.0, 2026-11-16)
UKPTouch input device measurement with the renderer property_bag probe pack (research repository ui-key-probe v1.0.0~v1.0.1, 2026-11-17)
UIIWindows measurement with the item trim text URL image test pack (research repository url-item-image v1.0.1~v1.0.2, 2026-11-16)
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
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
netease-mcdocsNetEase developer documentation (mc.163.com)NetEase's work. No redistribution, facts only, rewritten2026-11-13