Exporting
Press Export. Pick a target version, look over what validation found, and choose an output.
Target version
Bedrock 1.21.80+ (stable) — the default
The classic forms API (@minecraft/server-ui 2.1.0). Works on release Bedrock with no experiments enabled. Unless you specifically need something DDUI-only, use this: a pack built here works for everyone you send it to.
Preview — DDUI with images (beta)
The data-driven UI classes (CustomForm / MessageBox), which add two things the stable forms can't do: standalone images in a form's body, and picture buttons. Also a ✕ close button in the title bar.
A nuance worth knowing: the DDUI classes themselves are stable as of server-ui 2.1.0 and need no experiment. What's still Preview-only is the image surface (CustomForm.image and button imageDetails, added in 2.3.0-beta), so this profile targets that beta and needs the Beta APIs experiment.
Canvas enables that experiment automatically in any test world it builds. If you install the add-on into your own world instead, turn it on yourself in the world's experiment settings.
The DDUI runtime falls back to the stable API if the classes aren't available in the version you're running, so choosing this profile is never worse than choosing stable — at minimum you get the stable form (without the images, which the editor's lint flags at design time).
What comes out
.mcaddon
Import into Minecraft and enable on any world.
- A behaviour pack with the generated scripts and, if you're using a custom menu item, its definition.
- A resource pack, only if you used custom icons or a custom item. The behaviour pack declares it as a dependency, so enabling one enables both.
Inside:
canvas_bp/
manifest.json
scripts/main.js entry point for the chosen profile
scripts/core.js showing, retrying, response decoding, triggers
scripts/actions.js what each action does
scripts/buildersStable.js builds the three stable form types
scripts/ui.js your forms, as data
canvas_rp/
manifest.json
textures/canvas_ui/*.png your icons
textures/item_texture.json
Only ui.js is generated per project. Everything else is identical in every pack Canvas produces, which means it's the same code every time, tested once.
Test world (.mcworld)
A void flat world with a small stone platform at spawn, in creative with commands on, and your packs already installed and activated. Beta APIs is switched on if your profile needs it.
Import it, press play, and your menu is one command away. This is the fastest way to check a change — it's the difference between testing something and assuming it works.
The world is deliberately empty. It's a test rig, not a showcase: nothing to fall off, nothing to distract, and it loads instantly.
Validation before you export
The dialog lists everything validation found. Nothing here blocks the export — a project you're halfway through is half-wired by definition — but these are the mistakes that are painful to diagnose from inside the game, so it's worth a look.
Problems marked in red will misbehave; warnings in amber are probably not what you meant.
Seeing the generated data
Expand Show the generated form data to read the ui.js that will ship. Your forms appear as plain JSON: the items in order, the button list that selection indices map onto, and the compiled actions.
Two details there are worth knowing, because they're where hand-written form scripts usually go wrong:
buttonsis separate fromitems. Headers, labels and dividers appear in a menu but never consume a selection index. Canvas builds the button list from the buttons alone, so adding a divider can't shift which button does what.- Each item is tagged with whether it takes a value. Whether Bedrock's
formValuesincludes slots for decorations has changed between versions, so the runtime detects the layout from the array length rather than assuming one. Guessing wrong shifts every field by one and hands your command the value from the control above it.
Installing by hand
If you'd rather not use the test world:
- Double-click the
.mcaddon— Minecraft imports it. - Create or edit a world.
- Under Behaviour Packs, activate the Canvas pack. The resource pack comes with it.
- If you exported on the DDUI profile, switch on Beta APIs in the world's experiments.
- Play, and run
/canvas:open.
If nothing happens in game
- The command isn't recognised. The behaviour pack isn't active, or the world was created before it was added. Check the world's behaviour pack list.
- The command works but nothing opens. Look at the content log — the runtime warns there with a
[canvas]prefix. - A button does nothing. Check it has actions in the editor; validation flags empty ones.
- An icon is blank. Almost always a hand-typed texture path. Use a block icon or import a PNG instead.
- DDUI features are missing. Beta APIs isn't enabled for that world, so the runtime fell back to the stable forms.
Canvas