Skip to main content

Installation

Three things have to be in place: the package, the render pack in the world, and the stage that compiles your screens into the pack.

Prerequisites​

  • Node.js 26.13.0 or newer and Git
  • builder — pack compilation and exports

Screens require the JSON UI and runtime registrations produced by the build.

Quick start with the CLI​

The CLI scaffolds an addon with @bedrock-core/ui configured, TypeScript and ESLint, builder profiles, the render pack and a working example screen.

npx @bedrock-core/cli

Manual installation​

1. The package​

npm install @bedrock-core/ui

Components and hooks come from the main entry point. Subpaths expose navigation, container setup and development tools:

ImportWhat it is
@bedrock-core/uicomponents, hooks and render()
@bedrock-core/ui/navigationnavigation factories, links and navigation hooks
@bedrock-core/ui/containercreateContainerScreen(), for serving a container screen
@bedrock-core/ui/eslintCore hook and component lint rules for eslint.config.mjs
@bedrock-core/ui-runtime/compilethe build half the compiler reads; no addon reaches for it

2. The builder​

Install the build tool:

npm install --save-dev @bedrock-core/builder

Configure project metadata, packs and destinations as described in builder configuration. The ui-compiler stage discovers screens automatically and runs after translations and before bundling. It uses the project's installed UI compiler and runtime toolkit.

In a project with several packs, select the owner and its linked resource pack in the profile's stages map:

bedrockCore.profiles.default.stages
{
"ui-compiler": { "owner": "gameplay", "resourcePack": "assets" }
}

The owner's manifest must declare the resource pack as a local dependency. UI stage settings describe discovery and output.

Builder automatically loads the generated screen registrations from the built script entry.

3. The render pack​

The shared resource pack supplies the textures used by compiled screens. Download the compatible asset from the releases page and add its manifest version as a dependency in your behavior pack. Unchanged library patches reuse the existing asset from the same major/minor release line:

packs/BP/manifest.json
{
"dependencies": [
{
"uuid": "761ecd37-ad1c-4a64-862a-d6cc38767426",
"version": "1.14.0"
}
]
}

Include the resource pack in your .mcaddon:

pack.mcaddon
├── RP/ (your addon's resource pack)
├── BP/ (your addon's behavior pack)
└── core-ui-vx.y.z.mcpack (render pack from releases)

Shared resource pack explains asset selection, versioning and patch reuse.

Lint components and hooks​

The full CLI starter configures the Core hook lint preset. For a manual project, install the tooling and add coreHooks.configs.recommended from @bedrock-core/ui/eslint to the flat configuration. Lint components and hooks provides the complete setup, rule coverage and Core-specific contracts.

TypeScript configuration​

tsconfig.json
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "@bedrock-core/ui"
}
}

Run a first build to write editor declarations, then include .bedrock-core/generated/**/*.d.ts alongside authored sources in tsconfig. Generated runtime imports resolve automatically during script bundling.

Optional: ore-styled​

@bedrock-core/ore-styled is a themed component layer giving you vanilla-styled buttons, cards, checkboxes and more. Installing @bedrock-core/ui already includes it; on a minimal install add it explicitly:

npm install @bedrock-core/ore-styled
import { Button, Card } from '@bedrock-core/ore-styled';

Check it works​

Write a screen, build, then show it.

packs/BP/ui/hello.screen.tsx
import { Panel, Screen, Text } from '@bedrock-core/ui';

export default function Hello(): JSX.Element {
return (
<Screen>
<Panel padding={20}>
<Text>{'Hello from @bedrock-core/ui'}</Text>
</Panel>
</Screen>
);
}
npx bc-builder build config.json

Run the build before launching Minecraft. If render() throws UncompiledScreenError, check that the ui-compiler stage includes the screen and that the world uses the built behavior pack.

Next steps​