nim_duilib is a cross-platform desktop UI library in modern C++ (C++20), evolved from the classic duilib. Runs on Windows, Linux, macOS and FreeBSD.
DirectUI design: UI layout in XML, fully separated from C++ logic. Restyle without recompiling.
Key features:
- XML-driven layouts, 50+ controls (list/tree views, virtual lists, rich edit, menus, color picker, property grid, tab control...)
- Skia rendering, windowless controls, CPU/GPU acceleration
- Images: SVG/PNG/GIF/JPG/BMP/APNG/WEBP/ICO; Animations: GIF/APNG/WEBP/Lottie/PAG
- Dynamic skins, light/dark themes, accent colors
- Window shadows, DPI awareness, runtime multi-language switching
- CEF (109/142) and WebView2 integration; SDL3 windowing
- 22 examples; AI-assisted dev skills for Claude Code and TRAE
Compilers: VS2022/2026, VS2017/2019 (C++17 branch), LLVM, MinGW-W64, gcc, clang.
One-click scripts build Skia and all dependencies.
License: MIT.
Source: https://github.com/rhett-lee/nim_duilib
Features
- XML-driven layouts — define the whole window structure in XML; adjust control position, size and style without recompiling C++ code.
- Rich control set — 50+ built-in controls: buttons, text boxes, list views, virtual list boxes, tree views, sliders, progress bars, menus, color picker, property grid, tab control, rich text, and more. Custom controls are supported.
- High-performance rendering — powered by the Skia engine with windowless control rendering. CPU or GPU accelerated backends keep complex UIs smooth.
- Event-driven architecture — clean message-based event handling; events can be declared inline in the XML files.
- Image formats — SVG, PNG, GIF, JPG, BMP, APNG, WEBP, ICO.
- Animation formats — GIF, APNG, WEBP, Lottie JSON, PAG animation files.
- Dynamic skinning & themes — XML-defined skins, built-in light and dark themes, accent color customization, plus a theme design tool.
- Window shadows — rounded or square-corner shadows with adjustable size, updated in real time; native system shadows on Windows and macOS.
- DPI awareness — Unaware, SystemAware, PerMonitorAware and PerMonitorAware_V2 modes; independent DPI settings for high-DPI displays (Windows).
- Multi-language / i18n — dynamic language switching at runtime for globalized applications.
- CEF integration — libcef 109 (Windows 7 compatible) and libcef 142 (Windows 10+, Linux, macOS).
- WebView2 control — simple, easy-to-use wrapper for displaying web pages (Windows).
- SDL3 based cross-platform windowing — window management and input/output via SDL3, adapted for Windows, Linux, macOS and FreeBSD.