
MenuKit
UI library for Fabric mods — HUD panels, widgets, layouts, region anchoring, modal overlays. Client-only.
- Загрузки
- 1K
- Подписчики
- 1
- Обновлён
- 2 июля 2026 г.
- Лицензия
- MIT
Опубликован 5 апреля 2026 г.
MenuKit
MenuKit is a client-side UI library for Fabric mods. It provides reusable interface components and the systems that place them on screen, so mods can build menus, HUD overlays, and in-game UI without writing Minecraft interface code from scratch.
Components: buttons, toggles, checkboxes, radio buttons, sliders, dropdowns (single and multi-select), text fields, labels, tooltips, icons, item displays, progress bars, dividers, and scroll containers.
What it does:
- Places UI in four contexts with one set of components: the HUD, vanilla menu screens, named slot groups, and standalone screens.
- Groups components into panels, each a bounded region that renders, takes input, and shows or hides as a unit.
- Positions panels by screen region and resizes them to fit automatically, wrapping and scrolling as needed, at any GUI scale.
- Lets several mods add UI to the same screens without conflicting: components from different mods register cleanly and coexist (panels sharing a region stack in order instead of overlapping), so mods built on MenuKit stay compatible with each other.
- Exposes slots created through MenuKit: Containers to every MenuKit consumer, so a mod can read and address another mod's custom slots, not only its own.
- Handles modal overlays, click-through prohibition, recipe-book awareness, and cursor stability across screen changes.
MenuKit is client-only and ships primitives rather than taking over Minecraft's UI. Its types are vanilla types (a MenuKit slot is a real Slot), so it coexists with other mods. Requires Fabric. For custom container menus and slots with server-synced state, add MenuKit: Containers.
Install
repositories {
maven { url 'https://api.modrinth.com/maven' }
}
dependencies {
modImplementation 'maven.modrinth:menukit:2.0.0'
}
Declare it in fabric.mod.json:
"depends": { "menukit": "*" }
Working examples
MenuKit's validator mod is the honest reference consumer, with real, compiling usage of every primitive. The full surface is documented in the javadoc.
License
MIT. See LICENSE.
Issues
Ченджлог
2.0.0Релиз1.21.11 · 2 июля 2026 г.
MenuKit 2.0.0
A re-architecture - simpler and more unified, not bigger.
Three unifications:
- ONE WINDOW. Creating a slot and interacting with it are now separate. One window interacts with anything addressable - a vanilla slot, a created slot, an element, a panel - the same way.
- One region placement + reactive sizing. Three placement systems collapsed into one; every panel now auto-fits the screen (wraps its width, scrolls its height) at any GUI scale. The old relative-verb placement and lambda anchors are gone.
- Inertness and opacity, system-complete: hidden is inert, a visible opaque panel blocks click-through, whatever it covers is inert - one law.
Plus an adaptive-layout foundation, widget-gallery fixes, HUD text folded into the core (wrapping) label, and an everywhere-default for injected panels.
Breaking: this is a clean API break - the old slot/placement API does not compile against 2.0.
1.0.0Релиз1.21.11 · 16 мая 2026 г.
MenuKit 1.0.0
First stable release. Marks the split of the original MenuKit into two focused artifacts:
- MenuKit (this mod) — client-only UI library. HUD panels, widgets, layouts, modal overlays on vanilla menus, region anchoring.
- MenuKit: Containers — slot extension, depends on MenuKit. Custom container menus, per-slot state, slot-group regions.
Upgrading from 0.1.x
If your mod uses MenuKit 0.1.x and you depend on:
- HUD panels, widgets, layouts, modal overlays, region anchoring → MenuKit 1.0.0 alone is enough.
- Custom container menus, per-slot state, slot-handler-side machinery → also depend on MenuKit: Containers 1.0.0 (it transitively pulls in MenuKit, so a single dependency is enough).
The two artifacts are partitioned by side: MenuKit is environment: "client"; MenuKit: Containers is universal (both client and server). The dependency direction is one-way and gradle-enforced.
Highlights since 0.1.x
- Two-artifact partition (above).
- Multi-key keybind combos (up to 3 keys) ambient on all
KeyMappings via theMKKeybindExtduck interface. - Universal cursor capture compensating for vanilla's window-center cursor teleport on screen transitions.
- Region anchoring system — eight edge regions + CENTER, deterministic stacking across mods.
- Element library —
Button,Toggle,Checkbox,Radio,RadioGroup,Icon,Divider,ItemDisplay,ProgressBar,Slider,TextField,TextLabel,Tooltip,ScrollContainer,Dropdown. - HUD panels (
MKHudPanel.builder(...)) with dynamicSupplier-driven content. - Auto-wrap text labels + auto-scroll containers.
- Recipe-book-aware layout.
- Internal-API boundary marked with
@ApiStatus.Internal— the public consumer surface is everything not so marked.
0.1.1Бета1.21.11 · 7 апреля 2026 г.
No changelog was specified.
0.1.0Бета1.21.9, 1.21.10, 1.21.11 · 5 апреля 2026 г.
Initial release of MenuKit for Minecraft 1.21.11.
- Custom inventory slots with automatic NBT persistence and client-server sync
- Panel builder API: declarative layout with rows, columns, padding, and positioning
- Button system: toggle buttons, icon buttons, dynamic tooltips, pressed/disabled states
- Button attachments: inject buttons above any container region
- HUD overlay panels with anchoring and conditional visibility
- Mod families: shared keybind categories and unified config screens across mods
- Shift-click routing with directional control and priority slots
- Slot features: filters, ghost icons, locking, empty-click handlers
- Region and region group system for container organization
- Creative mode support with automatic slot repositioning
- Standalone screen API for full-screen custom UIs
Комментарии
Загружаем…