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.
- npm
- yarn
- pnpm
npx @bedrock-core/cli
yarn dlx @bedrock-core/cli
pnpm dlx @bedrock-core/cli
Manual installation
1. The package
- npm
- yarn
- pnpm
npm install @bedrock-core/ui
yarn add @bedrock-core/ui
pnpm add @bedrock-core/ui
Components and hooks come from the main entry point. Subpaths expose navigation, container setup and development tools:
| Import | What it is |
|---|---|
@bedrock-core/ui | components, hooks and render() |
@bedrock-core/ui/navigation | navigation factories, links and navigation hooks |
@bedrock-core/ui/container | createContainerScreen(), for serving a container screen |
@bedrock-core/ui/eslint | Core hook and component lint rules for eslint.config.mjs |
@bedrock-core/ui-runtime/compile | the build half the compiler reads; no addon reaches for it |
2. The builder
Install the build tool:
- npm
- yarn
- pnpm
npm install --save-dev @bedrock-core/builder
yarn add --dev @bedrock-core/builder
pnpm add --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:
{
"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:
{
"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
{
"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
- yarn
- pnpm
npm install @bedrock-core/ore-styled
yarn add @bedrock-core/ore-styled
pnpm add @bedrock-core/ore-styled
import { Button, Card } from '@bedrock-core/ore-styled';
Check it works
Write a screen, build, then show it.
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>
);
}
- npm
- yarn
- pnpm
npx bc-builder build config.json
yarn bc-builder build config.json
pnpm exec 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
- Hosts — which root to write, and what each screen can carry
- Components — every built-in component
- Hooks — state and effects
ui-compilerstage — every setting the build takes