Showcase
Every screenshot below is a web page (HTML, CSS and JavaScript) rendered by WebGUI inside Minecraft 1.21.11, captured in game at 1920×1080. Nothing is mocked up afterwards.

Pages in the game's own style
These pages use the game's own textures and font, which WebGUI hands to the page (Game assets, Game font), so they look like part of Minecraft.
Live HUD

A transparent HUD overlay: the minimap turns with the player, coordinates and heading come from the live client data, and the quest tracker shows the distance to its target. The "Objective complete" banner is plain CSS animation.
Talk to NPCs

A page bound to a villager, opened with a right click. The portrait is drawn from the villager's own textures.
Quest journal

A full-screen GUI on the game's book texture and advancement tabs.
Custom death screen

The page set as deathScreenUrl gets the real death data (webgui:death): who killed the player, where, and what they dropped. The respawn button calls the game.
Report window

Players nearby, a reason and the player's own chat as evidence, in the style of the vanilla containers.
Staff panel

A modern dashboard does not have to look like Minecraft at all: live charts, open reports and the server console in one screen.
Any look, any game mode
The page decides how things look; the game, or the mod or plugin that runs your game mode, supplies the data. The names, weapons and vehicles below are made up for these pages.

Tactical shooter

Round bar with portraits, a radar that turns with the camera, kill feed, money, health from the client, ammo and a crosshair. The match state arrives as a match:state event.

The buy menu sends the purchase back to the server as a match:buy event.
City roleplay

Wallet, wanted level, job, status rings, location and compass. The speedometer reads the player's real speed from the live position, so it works on a horse, in a minecart or in a vehicle mod's car.

A phone with apps and a dispatch chat; "Accept fare" posts rp:fare to the server.

A radial menu where the mouse direction picks the action, sent to the server as rp:vehicle.
Wiring it to your game mode
A plugin pushes state to the page and receives the player's choices back (Events):
// Update the page
WebGUI.emitToPage(player, "match:state", "{\"money\":4750,\"round\":17}");
// Receive what the player did
@EventHandler
void onPage(PageEventReceivedEvent e) {
if (e.getChannel().equals("match:buy")) {
shop.buy(e.getPlayer(), e.getJson());
}
}In the page:
window.webgui.on('match:state', (state) => render(state))
window.webgui.postToGame({ channel: 'match:buy', item: 'carbine' })A Fabric or NeoForge mod does the same through WebviewApi.
Credits
- City scenes: Los Perrito City by Uospag, CC BY 4.0.
- Shooter scenes: Hanger by ItsMiiOlly, Frac and Zan, from OvercastCommunity Public Maps, CC BY-SA 4.0.
- Shaders: Complementary Reimagined with Sodium and Iris. WebGUI does not need them.