RmlUi is an open-source C++ user interface library that takes HTML/CSS-like markup (RML and RCSS) and produces vertices, indices, and draw commands for your own renderer, targeting games and real-time applications. It is a fork of libRocket, adding new features, bug fixes, and performance improvements, and is maintained on GitHub under the MIT license.
What is RmlUi?
RmlUi is a C++ library that implements its own layout engine based on XHTML1 and CSS2 standards, with selected HTML5 and CSS3 features, designed as a complete solution for a project's interface needs. It takes RML documents (HTML-like tags such as input, textarea, and select) and RCSS style sheets as input, and outputs geometry and draw commands through an abstract render interface; it also provides full DOM access, event handling, and interactivity. The core library is a fraction of the size of integrating a full web browser, and it depends only on FreeType for fonts (replaceable) and the C++ standard library. C++17 is required.
Key Features
- Cross-platform architecture — Supports Windows, Linux, macOS, Android, iOS, Switch, and more.
- Dynamic layout system — Includes animations, transitions, transforms with interpolation, flexbox, media queries, border radius, box shadows, mask images, and linear/radial/conic gradients as decorators.
- Data binding (model-view-controller) — Synchronizes application data with UI elements, with two-way binding for input fields; shown in the
hello_worldsample. - Decorator engine — Enables custom application-specific effects applied to any element, plus built-in gradient and image decorators.
- Extensible interfaces — Render, system, file, and font interfaces can be replaced or customized; the font engine can be swapped out entirely.
- Runtime visual debugging suite — Built-in debugger for inspecting element hierarchy and styling at runtime.
- Backends for common renderers and platforms — Ships with OpenGL 2/3, Vulkan, SDL GPU, SDLrenderer, and DirectX 12 renderers, plus Win32, X11, SFML, GLFW, and SDL platform implementations.
Who is it for?
- Game developers — Building menus, HUDs, and in-game UI without embedding a browser; used by The Thing: Remastered, Killing Time: Resurrected, and Unvanquished.
- Engine programmers — Integrating a lightweight UI system into a custom engine; the abstract interfaces and backends are designed to be plugged in or copied.
- Tool developers — Creating installers, asset converters, and companion apps, such as the Alchemist GTAV converter and the alt:V installer.
- Web designers moving to C++ — Anyone comfortable with HTML/CSS can author RML/RCSS using familiar syntax and layout concepts.
What can you do with RmlUi?
- In-game menus and HUDs: Design responsive dashboards with CSS-like transitions and transforms; the included samples demonstrate animated menus and camera movement.
- Data-bound interfaces: Build forms and live-updating panels where application data and UI text stay in sync, as shown in the
data_bindingsample. - User-facing tools: Construct installers, chat panels, and world maps with custom decorators and sprite sheets, as seen in TruckersMP and ROSE Online.
How does RmlUi work?
After linking the library, you implement the render interface, initialize RmlUi, create a context, load fonts, and load a document. In your main loop, you submit input events, call the context's update and render methods, and present your frame. RmlUi only executes when you call its API — it never runs in the background — and you control when input, rendering, and file handling occur.
FAQ
Is RmlUi free?
Yes, RmlUi is published under the MIT license. Third-party source code included in the core is MIT-licensed, debugger fonts use the SIL Open Font License, and the Vulkan backend's bundled library is MIT-licensed as well.
What platforms and renderers are supported?
Windows, Linux, macOS, Android, iOS, and Switch are listed as supported platforms. Renderer backends include OpenGL 2 and 3, Vulkan, SDL GPU, SDLrenderer, and DirectX 12, with feature support varying by backend.
Does RmlUi embed a web browser?
No, RmlUi has its own layout engine and outputs vertices, indices, and textures for your renderer. It is based on XHTML1/CSS2 with some HTML5/CSS3 features, but does not aim for full CSS or HTML compliance.
How do I integrate RmlUi into my project?
Build with CMake or install via vcpkg, implement the render interface, initialize the library, create a context, load a document, and call update and render each frame. Many backends are included to get started quickly.
Can I replace the font engine?
Yes, the FreeType dependency can be fully replaced by a custom font engine through the provided font engine interface.
Alternatives
- libRocket — the original project that RmlUi forked from, which RmlUi extends with new features and fixes.








