Lumina UI
A fast, flexible GUI library: flexbox layout, themes, smooth animations, gradients, HTML/CSS screens, 60+ widgets, HUD and server-synced menus
介绍

Lumina UI is a library for building beautiful, fast and flexible interfaces in Minecraft mods.
It is a dependency for other mods: on its own it adds only a small demo (/lumina demo).
Supports Forge 1.20.1 and NeoForge 1.21.1 with the same API, so UI code written once works on both.
Why Lumina
- Looks modern out of the box. Rounded corners, borders, soft shadows, glow and gradients are drawn by an SDF shader, crisp at any GUI scale.
- Fast. Layout and styles are cached, invisible elements are skipped, nothing runs while the UI is idle, and frames render with almost no allocations.
- Flexible. Every widget, layout, style property and event can be replaced or extended with plain Java code. No reflection, no annotations.
- Reactive. Bind widgets to signals and they update themselves.
Features
- Layout: flexbox (gap, grow/shrink, justify, align), stack layers, grid, absolute positioning, responsive breakpoints, UI scale.
- Styling: themes with tokens (change the accent color or corner radius and the whole UI follows smoothly), multiple style classes, hover/pressed/focused/disabled states, per-property transitions.
- Colors: RGB, HSV, HSL, OKLCH; linear, radial and conic gradients with up to 8 stops; blend modes; backdrop blur.
- Animations: keyframes, sequences, loops, yoyo, 23 easing curves and springs.
- HTML and CSS: describe screens with markup and stylesheets, bind logic right in the markup, hot reload with F3+T, override with resource packs.
- 60+ widgets: buttons, text and number fields, sliders, toggles, checkboxes, radio groups, dropdowns, key bind fields, date and color pickers, tabs, side navigation, windows, context and radial menus, tooltips, tables, trees, virtual lists for tens of thousands of rows, charts, forms with validation, wizards, Markdown and books with syntax highlighting.
- Game widgets: inventory slots with drag and drop, mobs and the player in 3D, 3D items and block structures, world preview, minimap and world map.
- In-game HUD: bars, gauges, timers, boss bars, toasts and a notification feed, bound to live game data.
- Server-synced container screens: your own chests and machines with a Lumina UI, synced like vanilla menus.
- Config screens generated from a simple description, saved as TOML.
- Vanilla effects in the UI: fire, explosions, falling TNT, snow, rain and particles.
- Live language switching: the open screen is translated instantly, no rebuild needed.
- Accessibility: color-blindness correction, high-contrast themes, text scale, reduced motion, focus narration.
- Developer tools: UI inspector, gamepad navigation, theme editor.
Quick example
Signal<Integer> clicks = Signal.of(0);
Panel window = Panel.column().gap(10).add(
new Label("Lumina UI").scale(1.5f),
Label.bound(clicks.map(c -> "Clicks: " + c)),
new Button("Press me", () -> clicks.update(c -> c + 1)));
Minecraft.getInstance().setScreen(new LuminaScreen(Component.literal("Example"),
screen -> new UiRoot(Panel.box(StackLayout.centered()).fill().add(window))));
For developers
The developer guide covers adding the dependency, your first screen, the whole API and how to extend it: Wiki: Developer Guide.
License
Lumina UI is licensed under the GNU LGPL 3.0: you can use it in any mod, including closed-source ones; modified versions of the library itself must stay open under the same license.
For players
Install Lumina UI only if another mod requires it. Put the jar for your loader into the mods folder.
常见问题
Lumina UI 支持哪些 Minecraft 版本?
Lumina UI 支持 Minecraft Java 版 1.20.1–1.21.1,共 2 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
Lumina UI 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
Xylos_Official 的其他作品
查看全部 →
Create: Warnautics
一个机械动力:大炮的附属模组,炸弹、炸弹,还有更多炸弹!从小型炸弹到大型炸弹,从 C4 到(即将推出的)核弹,应有尽有。
[SBW] Electronic Warfare
[SBW]电子战为Superb Warfare添加了电子战系统、无线电、FPV无人机、光纤控制、反无人机网、EMP武器、拦截和制导导弹。
Sable: Destructive
为 Sable 带来物理驱动的破坏效果:逐块冲击、陨坑、碎片、扬尘、冲击波、镜头震动、自定义光影,以及实时服务器控制。
Cuffed Ported
将 Cuffed 模组的功能移植到 1.21.1 版本,加入手铐和其他监狱元素。
评论
登录后评论和评分