Community listing page, reviews here may not be monitored by the author.
MenuKit
No reviews yet
UI library for Fabric mods: HUD panels, widgets, layouts, region anchoring, modal overlays. Client-only.
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
Runs entirely on the client. Works on vanilla servers.
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
MenuKit
MenuKit is a UI library for Fabric mods. It provides reusable interface components and the systems that place them on screen. Mods build menus, HUD overlays, slots, and in-game UI with it instead of writing Minecraft interface code from scratch.
It ships as two artifacts from this repository:
| Artifact | Runs on | Adds |
|---|---|---|
menukit |
Client only | Panels, elements, HUD panels, placement on vanilla screens, standalone screens |
menukit-containers |
Client and server | Created slots, custom container menus, per-slot state, storage attachments |
menukit-containers depends on menukit. A mod that needs no slots depends on menukit alone and stays client-only.
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. Containers adds slots.
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 more than one mod add UI to the same screen without conflict: panels sharing a region stack in order instead of overlapping.
- Creates real, server-synced slots as UI components and shows them on every container screen without per-screen setup.
- Attaches per-slot state to any slot, private per player or shared across viewers, stored on the slot's owner and readable with
/data get. - Handles modal overlays, click-through prohibition, recipe-book awareness, and cursor stability across screen changes.
Its types are vanilla types (a MenuKit slot is a real Slot). Requires Fabric.
Install
repositories {
maven { url 'https://api.modrinth.com/maven' }
}
dependencies {
modImplementation 'maven.modrinth:menukit:4.0.0+26.2'
// Only if the mod creates slots or custom menus. Pulls in menukit transitively.
modImplementation 'maven.modrinth:menukit-containers:4.0.0+26.2'
}
Declare what you use in fabric.mod.json:
"depends": { "menukit": ">=4.0.0" }
"depends": { "menukit": ">=4.0.0", "menukit-containers": ">=4.0.0" }
Example
A HUD readout, registered once from the client entry point:
MKHudPanel.builder("mymod:readout")
.anchor(MKHudAnchor.CENTER, 0, 20)
.autoSize().padding(4)
.hideInScreen()
.text(0, 0, () -> "Hello from MenuKit")
.build();
Nine synced pocket slots on every container screen, registered once from the common entry point (Containers):
public static final PlayerStorageAttachment<NonNullList<ItemStack>> POCKETS =
StorageAttachment.playerAttached("mymod", "pockets", 9);
MKCContainerPanel.define("mymod:pockets")
.at(MenuRegion.LEFT_ALIGN_TOP, 7)
.style(PanelStyle.RAISED)
.addSlot(SlotSpec.at("pockets").count(9)
.storage(player -> POCKETS.bind(player)))
.register();
Docs
- Getting started: dependency, one HUD panel, one inventory-screen panel.
- Concepts: panels, elements, regions, the four contexts, slots, addresses.
- Recipes: the common tasks, with samples from shipping mods.
- Limits: what MenuKit does not do and the open gaps.
- Reference: the generated javadoc for both artifacts.
The validator-mk and validator-mkc mods in the same workspace are the reference consumers, with compiling usage of every primitive.
Repository layout
menukit/: themenukitartifact.menukit-containers/: themenukit-containersartifact.docs/: the guides above.
Both artifacts build from the workspace root: ./gradlew :menukit:build :menukit-containers:build.
Upgrading from 2.x
3.0.0 renames the Java package from com.trevorschoeny.menukit to com.trevlar.menukit. Replace the prefix in every import. No class or method names changed.
License
MIT. See LICENSE.
Issues
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers