build-ui

Build 2D screen-space UI for Decentraland scenes using React-ECS JSX components.

1|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/stom66/dcl-bowling --skill build-ui-stom66
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: build-ui
Source: https://github.com/stom66/dcl-bowling/tree/main/agent/skills/build-ui
Command: npx skills add https://github.com/stom66/dcl-bowling --skill build-ui-stom66

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @dcl/sdk, @dcl/react-ecs, and includes references (resource) components.

What problem does it solve? Creating HUDs, menus, dialogs, and form inputs in Decentraland SDK7 scenes requires navigating React-ECS quirks like version-gated virtual screen behavior, uncontrolled inputs, engine-dependent text sizing, and pointer-blocking pitfalls that silently break UI across explorers. ## Core Features & Use Cases - React-ECS UI Construction: Build HUDs, health bars, modal dialogs, inventories, scrollable lists, and dropdowns from UiEntity, Label, Button, Input, and Dropdown primitives with correct virtual screen sizing (1920x1080) and screenInset handling. - SDK Version Gating: Handles the 7.26.0 behavior changes for virtual screen defaults, screenInset options, and UI scale factor formulas so layouts work on both old and new SDK versions. - Drag Sliders & Advanced Patterns: Implements drag sliders via PrimaryPointerInfo.screenDelta with scale-factor correction, plus guidance on pointer-blocking gotchas, emoji limitations, and per-explorer text sizing differences. - Use Case: A scene developer needs a settings menu with a volume slider and a confirmation dialog; this Skill produces working JSX that renders correctly on both the Unity and Bevy explorers without blocking world clicks. ## Quick Start Ask the AI to build a Decentraland scene UI, such as a HUD with a health bar and a settings menu, using the build-ui skill.

Frequently Asked Questions about build-ui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a UI for a Decentraland SDK7 scene?▼

Create a src/ui.tsx file with a React-ECS component using UiEntity, Label, and Button, then call ReactEcsRenderer.setUiRenderer with virtualWidth 1920 and virtualHeight 1080 from a setupUi() function invoked in main(). The root UiEntity should use width and height of 100%.

How do I make a drag slider in Decentraland React-ECS?▼

UI event handlers receive no pointer coordinates, so track movement with PrimaryPointerInfo.screenDelta accumulated in a system, divided by the UI scale factor. Render a full-screen pointer-blocking overlay only while dragging to catch the release, and add stepper buttons for mobile where screenDelta is always zero.

Why is my Decentraland UI not rendering on screen?▼

The most common cause is a missing setupUi() call in main() or a missing setUiRenderer call inside it. Also check that the root component does not return null on first render and that the file uses the .tsx extension.

Does Decentraland UI support React hooks like useState?▼

No, React hooks are not available in Decentraland React-ECS. Use module-level variables for state; the UI renderer re-renders every frame, so changes to those variables are reflected immediately.

Why does my Decentraland UI look correct on one explorer but broken on another?▼

Text intrinsic sizing is engine-dependent: the Bevy explorer measures rendered text while the Unity explorer gives unset Label dimensions zero size, causing overlap and collapsed panels. Give every Label an explicit width and height, and never use emoji, which the Unity explorer cannot render.

When should I use TextShape instead of React-ECS UI in Decentraland?▼

Use TextShape with Billboard for 3D text floating in the world, such as labels above NPCs or objects. Use React-ECS only for 2D screen-space overlays like scoreboards, menus, and dialogs.