MenuKit

MenuKit

UI library for Fabric mods — HUD panels, widgets, layouts, region anchoring, modal overlays. Client-only.

by
415 Downloads
fabriclibrary
Rent Server with this Mod

About this Mod

MenuKit

UI library for Fabric mods. HUD panels, widgets, layouts, modal panels on vanilla menus, region anchoring, click-through prohibition, recipe-book awareness — all client-only.

What it is

MenuKit is a Fabric-side UI library for mod authors. It provides primitives for putting UI on top of Minecraft:

  • HUD panels that overlay the game world (waypoint markers, status displays, debug overlays)
  • Decoration panels on vanilla menu screens (settings buttons next to the inventory, info displays on storage UIs)
  • Standalone screens built from MenuKit primitives instead of vanilla widget code
  • Region anchoring so panels position themselves relative to screen edges and other panels — multiple mods coexist without overlapping
  • Modal overlays with proper click-through prohibition
  • Recipe-book awareness so panels respect the player's recipe-book state

MenuKit is pure client-side. If you only need UI, depend on MenuKit alone. If you need custom container menus with slots, see MenuKit: Containers — the slot extension built on MenuKit.

Install

Add the Modrinth Maven repository and the MenuKit dependency to your build.gradle:

repositories {
    maven { url 'https://api.modrinth.com/maven' }
}

dependencies {
    modImplementation 'maven.modrinth:menukit:1.1.0'
}

And declare the dependency in your src/main/resources/fabric.mod.json:

"depends": {
    "menukit": "*"
}

That's it. MenuKit is client-only (environment: client), so its weight on your mod is zero on the server side.

Quickstart

A HUD panel

// In your ClientModInitializer
public void onInitializeClient() {
    MKHudPanel.builder("coords")
        .anchor(MKHudAnchor.TOP_LEFT, 4, 4)
        .padding(4).autoSize()
        .style(PanelStyle.RAISED)
        .text(0, 0, () -> "X: " + (int) Minecraft.getInstance().player.getX())
        .text(0, 12, () -> "Y: " + (int) Minecraft.getInstance().player.getY())
        .build();
}

A decoration panel on a vanilla menu screen

// In your ClientModInitializer
List<PanelElement> elements = List.of(
    new Button(0, 0, 50, 16, Component.literal("Settings"),
        btn -> openSettings()));

Panel buttonPanel = new Panel(
    "myapp-settings-button",
    elements,
    /*visible=*/ true,
    PanelStyle.NONE,
    PanelPosition.BODY,
    /*toggleKey=*/ -1);

new ScreenPanelAdapter(buttonPanel, MenuRegion.RIGHT_ALIGN_TOP, /*padding=*/ 0)
    .on(InventoryScreen.class, CreativeModeInventoryScreen.class);

The button appears in the upper-right of vanilla InventoryScreen and CreativeModeInventoryScreen. If another MenuKit-using mod also drops a panel in RIGHT_ALIGN_TOP, both stack vertically — no manual coordination required.

Feature highlights

  • Region anchoring system. Eight edge regions (LEFT/RIGHT × ALIGN_TOP/BOTTOM, TOP/BOTTOM × ALIGN_LEFT/RIGHT) plus CENTER. Panels stack in the region's flow direction. Multi-mod-friendly by design — deterministic stacking order across mods via alphabetical-by-modId with optional priority override.
  • Element library. Button, Toggle, Checkbox, Radio, RadioGroup, Icon, Divider, ItemDisplay, ProgressBar, Slider, TextField, TextLabel, Tooltip, ScrollContainer, Dropdown, DropdownMulti (multi-select).
  • Modal overlays. Proper click-through prohibition over vanilla menus. Modals respect Esc, focus traversal, and z-ordering.
  • Recipe-book awareness. Panels track the recipe-book panel's open/closed state so they don't fight for screen real estate.
  • Auto-wrap + auto-scroll. TextLabel.setWrapWidth() triggers automatic line wrapping; ScrollContainer provides scrollable regions with mouse-wheel input; long text scrolls into view on overflow.
  • Control styling. Elements opt into MenuKit-styled or vanilla-matched looks — including vanilla-style pressed visuals — so your UI can blend in or stand apart.
  • Universal cursor capture. Compensates for vanilla teleporting the cursor to window center on screen transitions.
  • Stable, opinionated layout. Pinned-width / pinned-height stacking primitives keep panels predictable across resolutions.

MenuKit alone vs. MenuKit + Containers

Use MenuKit alone if you're building:

  • HUD overlays (waypoints, debug, status)
  • Decoration panels on vanilla menus (settings buttons, info displays)
  • Custom screens built from MenuKit elements

Use MenuKit + MenuKit: Containers if you're building:

  • Custom container menus (storage blocks with new slot layouts)
  • Per-slot state that needs server authority
  • Anything that touches slot handlers

MenuKit: Containers depends on MenuKit; MenuKit doesn't depend on MenuKit: Containers. The partition is enforced at compile time.

License

MIT. See LICENSE.

Issues

File issues at github.com/trevorschoeny/menukit/issues.

Available Versions

MenuKit 1.1.0release
MC 1.21.11fabric
June 19, 2026
MenuKit 1.0.0release
MC 1.21.11fabric
May 16, 2026

How to Install MenuKit on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.11).

3

Install Mod

Open the mod browser in the dashboard and search for "MenuKit". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.21.11, 1.21.10, 1.21.9 (+9 more)

Server-side

Unsupported

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

MenuKit server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.11). You can switch loaders with one click in the panel.

Is MenuKit compatible with fabric?

MenuKit officially supports fabric for Minecraft 1.21.11, 1.21.10, 1.21.9. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with MenuKit – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if MenuKit consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install MenuKit with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Unsupported

Supported Versions

1.21.111.21.101.21.91.21.81.21.71.21.61.21.51.21.41.21.31.21.2+2 more