Skip to content
Refaltor77 edited this page Mar 29, 2026 · 5 revisions

wiki_logo

EasyUIBuilder Wiki

Welcome to the EasyUIBuilder wiki — the complete reference for building Minecraft Bedrock Edition JSON UI with PHP.

What is EasyUIBuilder?

EasyUIBuilder is a PHP 8.0+ library that generates Minecraft Bedrock Edition JSON UI files using a fluent builder pattern. Write clean PHP code, get valid resource packs.

Installation

git clone https://github.com/Refaltor77/EasyUIBuilder.git
cd EasyUIBuilder/
php start.php

Or via Composer:

composer require refaltor/easy-ui-builder

Getting Started

1. Create a screen class

Create a file in tests/ (or wherever you like) implementing RootBuild:

<?php
namespace refaltor\roots;

use refaltor\ui\builders\Root;
use refaltor\ui\builders\RootBuild;
use refaltor\ui\elements\Label;
use refaltor\ui\colors\BasicColor;

class MyScreen implements RootBuild
{
    public function root(): Root
    {
        $root = Root::create();
        $root->addElement(
            Label::create("title", "Hello World!")
                ->setFontSize(Label::FONT_EXTRA_LARGE)
                ->setShadow()
                ->setColor(BasicColor::yellow())
        );
        return $root;
    }

    public function getNamespace(): string { return "my_screen"; }
    public function getPathName(): string { return "./resources/pack_example/"; }
    public function titleCondition(): string { return "MY_SCREEN_TITLE"; }
}

2. Register in Entry.php

public function startingService(): void {
    $this->register(new MyScreen());
}

3. Generate

php start.php

This creates 3 files:

  • ui/_ui_defs.json — Registry of all UI files
  • ui/server_form.json — Server form with title conditions
  • ui/custom_ui/my_screen.json — Your screen definition

4. Use in Minecraft

Copy the generated resources/pack_example/ folder into your Bedrock resource pack. The screen becomes visible when #title_text matches your titleCondition().


Pages

Core Elements

  • Element — Base class (anchors, size, offset, bindings, animations)
  • Label — Text display
  • Panel — Container / layout
  • Button — Interactive button
  • Image — Texture / graphics
  • Grid — Dynamic grid layout
  • Stack Panel — Auto-stacking layout

Extended Elements

Utility Elements

Systems

Reference

Clone this wiki locally