Skip to content

Repository files navigation

@bedrock-core/ui

Logo

⚠️ Beta Status: Active development. Breaking changes may occur until 1.0.0. Pin exact versions for stability.

This is not ready for production use.

Custom JSX-driven UI system for Minecraft Bedrock. Components serialize into compact strings decoded by a companion resource pack to render rich layouts beyond native @minecraft/server-ui limitations.

📘 Full documentation & guides: https://bedrock-core.drav.dev/

Preview


🗺 Development Roadmap

✅ Beta 0.1.0 - Core Foundation

  • ✅ Serialization protocol with UTF-8 safety
  • ✅ JSX runtime with custom component system
  • ✅ Base components (Panel, Text, Image, Fragment)
  • ✅ JSON UI resource pack decoder
  • ✅ TypeScript library with proper exports

✅ Beta 0.2.0 - State & Button

  • ✅ Component: Button with click events
  • ✅ State management hooks
  • ✅ Event system

✅ Beta 0.3.0

  • No features, just fixes to workflows and automated releases.

✅ Beta 0.4.0 - Styling

  • ✅ Flex, margins, paddings, spacing...

✅ Beta 0.5.0 - Theming

✅ Beta 0.6.0 - Navigation & Item Rendering

  • ✅ Stack-based multi-screen navigation system
  • ✅ Screen parameters and typed route state
  • ✅ Navigation hooks: useNavigation(), useRoute()
  • NavigationContainer, createStackNavigator, Screen
  • ItemRenderer component — render item icons inside layouts
  • useSetScreen hook — override screen layout per build
  • ✅ Ore-Styled item components: ItemSlot, ItemContainer, EquipmentSlots

✅ Beta 0.7.0 - Interactive Components & Custom Natives

  • ✅ Custom native component API — register your own native JSON UI components compatible with @bedrock-core/ui
  • ✅ Modal-backed form primitives in @bedrock-core/ui: Input, Dropdown, Slider (v0)
  • ✅ Ore-Styled form fields in @bedrock-core/ore-styled: Input, Dropdown, Slider
  • ✅ Scroll fixes — corrected scroll sizing and removed the fixed screen layout

✅ Beta 0.8.0 - Multi-Scroll & Layout Polish

  • <Scroll> component — declare up to 4 independent scroll regions per render (pool protocol v0007)
  • ✅ Gamepad cursor support — analog-stick virtual cursor with hover-to-scroll for all custom screens

✅ Beta 0.9.0 - Native Forms

  • <Form> component — a native ModalFormData-backed form with an atomic single-submit lifecycle (onSubmit/onCancel)
  • ✅ Form field primitives in @bedrock-core/ui: Form.Toggle, Form.Slider, Form.Dropdown, Form.InlineSelect, Form.Input, Form.Option
  • Form.Button — in-flow submit / exit action buttons, positioned anywhere in the form
  • ✅ Ore-Styled form fields in @bedrock-core/ore-styled: Form.Toggle, Form.Checkbox, Form.Radio, Form.ToggleButton, Form.Slider, Form.Dropdown, Form.Input, Form.Button

✅ Beta 0.9.2 - Performance Overhaul

  • ✅ Engine-side JSON UI cost cut dramatically (in-game verified): one merged label_cell decode per cell instead of a 5-variant fan-out, binding_condition: once/visible across every screen-constant decode chain, and a region gate hoisted into the routers
  • ✅ Serializer cell elision — background-less <Panel>s emit nothing; Panel(background) + single <Text> pairs fold into one cell
  • <Image> routed through the native header factory slot (engine-level type routing on ActionForms)
  • ⚠️ <Scroll> cap lowered from 4 to 2 per render (MAX_POOLED_SCROLLS) — every mounted pool slot re-instantiates the full collection, so the pool stays as small as real layouts need; see scroll_pool.json for how to grow it back

🚧 Beta 0.X.0 - More core components (Planned)

  • Entity render(?) (Render items using entities holding the current item? Render ItemStack entity?)
  • Structure render

👀 Beta 0.X.0 - [REDACTED] (Planned)

  • ?
  • ?
  • ?

🚀 Future Considerations

  • Compound components (tabs, menus, dialogs)
  • Animation support
  • Resource pack builder automation
  • Reactive data binding (if feasible)
  • Export feature for "non-form" JSON UI
  • Support for translations params (key:string, with: string[]) in SerializableString

🤝 Contributing

Let's talk in Discord https://bedrock-core.drav.dev/discord

For technical documentation and implementation details, see:

📖 Resources

What about ore-ui/DDUI?

ore-ui: When it releases in Number.MAX_SAFE_INTEGER years, will consider if it is worth to port for ore-ui. DDUI: It cannot be made compatible, DDUI does not use JSON UI so we cannot use the same methods.

Notes

Common web behaviour is one web has a single or multiple theme but all controlled by the same team/person.

Here in Minecraft we may have multiple addons each with their own UI, styling...

About

Use jsx (React-like syntax) to make interactive UI in Minecraft Bedrock

Resources

Stars

23 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages