QuickUIDesign is a React-based UI development template designed specifically for Unreal Engine 5 (UE5). It provides a complete toolchain for creating interactive UE5 interfaces using modern frontend technologies, enabling developers to build high-performance game UI with React.
The template source code is located in the src/ directory with the following structure:
src/pages/template/index.tsxThe application entry point that mounts the root component:
src/pages/template/App.tsxThe main application component that sets up the UE5 connection context and configures the auto-fit layout:
Key features:
UEProvider: Provides the global UE5 connection context to all child componentsuseQuickUIEventListener: Must be called once in the root component to enable event listening in child componentsautofit.js (optional): Enables responsive scaling to maintain consistent layout across different resolutions. Pass Fit={true} to activate.src/components/UEConnect-Demo/index.tsxA complete reference component demonstrating the core ue-connect APIs:
useInputBlocker: Disables right-click context menu and Tab keyuseUEContext: Retrieves UE5 connection status, device type, mouse state, and last key actionuseQuickUIEventSender: Sends custom events to UE5useQuickUIEventListener: Listens for events from UE5data-nohit attribute: Marks elements as non-penetrable for mouse events, allowing proper event routing between Web UI and UE5src/styles/index.cssTailwind CSS entry point with the three core directives:
src/lib/utils.tsThe cn() helper function combines clsx and tailwind-merge for conditional class name merging:
src/types/@type.d.tsModule declarations for static asset imports used in the project:
ue-connect is the core UE5 connector module located in the ue-connect/ directory. It provides a complete set of hooks and context management tools for establishing bidirectional communication between React and UE5.
For detailed documentation, please visit the ue-connect documentation
The assets-tool/ directory contains two build helper utilities for optimizing the final output for UE5 integration.
Converts image (PNG/JPG) or WebAssembly (WASM) files to Base64-encoded text files, making it easy to embed assets directly in UE5.
Usage:
Corresponding npm script:
How it works:
data:image/png;base64, or data:application/wasm;base64, prefixfilename-base64.txt file in the same directory.png, .jpg, .wasmAn HTML inlining tool that inlines all external JS, CSS, images, and font files referenced in the build output into a single self-contained HTML file, suitable for loading in UE5's web browser widget.
Usage:
Corresponding npm script:
Supported merge types:
| Resource Type | Processing |
|---|---|
JavaScript (<script src="...">) | Reads JS content, removes comments, inlines as <script> |
CSS (<link href="...">) | Reads CSS, inlines images/fonts as Base64, minifies, inlines as <style> |
Images (<img src="...">) | Converts to Base64 and inlines into src attribute |
| CSS-referenced images/fonts | Automatically converted to Base64 data URLs |
Use case:
rspack build, the generated HTML with external resources is processed by this toolThe project uses Rspack (a high-performance Rust-based web build tool) as its core bundler. The configuration file is located at the project root.
Entry Configuration:
src/pages/template/index.tsx is the single entry point for the template application. All components and dependencies are bundled starting from this file.
Module Resolution & Aliases:
@ alias simplifies source imports, e.g. import App from '@/pages/template/App'ue-connect alias ensures the module reference points to the local ue-connect/ directoryCode Minification:
Uses SWC (Speedy Web Compiler) and Lightning CSS for high-performance JS/CSS minification.
Dev Server:
Documentation images are stored in the pages/public/images/ directory (the public/images/ under the Rspress root directory) and can be referenced in the following ways:
Absolute path (via public/ directory):
Place images in pages/public/images/ and reference them in MDX using /images/filename:
Relative path (alongside MDX files):
Place images in the same directory as the MDX file and use relative paths:
| Scenario | Recommended Approach | Notes |
|---|---|---|
| Site Logo / Favicon | public/images/ | Referenced via logo / icon in rspress.config.ts |
| Inline documentation images | public/images/ or alongside MDX | Use public/ for shared images, adjacent for page-specific ones |
| Images in UE5 build output | Use convertImageToBase64 tool | UE5 template requires Base64 inlined images |
Start the development server:
This launches a local dev server with hot module replacement for rapid development.
Build the project for production:
The build output will be generated in the dist/merged/ directory as a single HTML file with all assets inlined, ready for use in UE5.
After building, the generated HTML file can be loaded in UE5 using the QuickUI plugin's web browser widget, enabling seamless bidirectional communication between React and UE5.