Modify UI

JsonUI Scripting allows you to modify or override existing UI elements in Minecraft: Bedrock Edition — whether it's the vanilla UI or custom UIs like NekoUI, Ty-el UI, or BetMC UI.

How to Modify UI

To modify UI, you need to import the following modules:

  • Vanilla: for built-in Minecraft UI (e.g. start screen)
  • Modify: for external/custom packs (e.g. NekoUI, Ty-el UI, BetMC UI)

You can find modifiable UI paths for vanilla Minecraft from the Bedrock Samples repository.

Examples

Add a Text to the Vanilla Start Screen

import { Vanilla, UI } from "jsonui-scripting"

// Create a new text label
const text = UI.label({
	text: "Hello, world!",
	layer: 10,
	shadow: true,
})

// Add it to the start screen
Vanilla.start.startScreenContent().addChild(text)

Custom Background for NekoUI

import { Modify, UI } from "jsonui-scripting"

// Modify a specific UI file in NekoUI
const nekoUI_BG = Modify.register(".hans_common_files/.hans_animated_background.json", "bg_anim")

// Remove the default background
nekoUI_BG.modify.controls.remove("bg_anim_b")

// Create a new custom background
const customBG = UI.panel({ size: "100%" }).addChild(
	UI.image({
		size: "100%",
		fill: true,
		texture: "path/to/your/image.png",
	})
)

// Add the custom background
nekoUI_BG.addChild(customBG)

This only works if the user has NekoUI installed.

Override UI

You can also override an entire screen or container using .override.

Example: Override Vanilla Start Screen

import { Vanilla, UI } from "jsonui-scripting"

const text = UI.label({
	text: "Hello, world!",
	layer: 10,
	shadow: true,
})

// Completely override the start screen
Vanilla.start.startScreenContent().override.addChild(text)

Tips

  • Always check the UI hierarchy in the target UI pack to know what you’re modifying.
  • Use .override carefully — it replaces the original content.
  • If you’re modifying external packs, be sure the pack is actually installed and active in Minecraft.