A modal composed from the original Minecraft PopupScreen surface.
Preview
Usage
Keep DialogTitle and DialogDescription in DialogHeader. The root defaults to scale 2 and Content inherits it. The example controls open and closes only after its Continue callback has updated the saved count.
Composition
DialogContent owns Portal and Overlay; do not add another default layer. DialogFooter contains DialogClose and real Buttons. Content width 250 is in logical pixels. showCloseButton supports false only: the port closes through footer actions or Escape.
Interaction and limits
A Button used for submit or confirmation must call your open-state setter when the action succeeds. DialogClose closes automatically. Focus trapping and return are Base UI behavior; responsive overflow and custom rich content are web adaptations beyond the fixed native PopupScreen cases.
See the upstream API for the underlying part and event contracts.
Installation
Component source
This is the component implementation. Its supporting styles, helpers and resources are also required. See complete manual installation.
"use client";
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
import * as React from "react";
import { Button } from "./button";
import { minecraftCardSprite } from "./minecraft-card-sprite";
import { MinecraftDialogBackdrop } from "./minecraft-dialog-backdrop";
import {
DialogLayoutContext,
MinecraftDialogText,
} from "./minecraft-dialog-text";