An anchored Minecraft popup panel for contextual content.
Preview
Usage
Popover supplies scale 2 by default. Place a named Trigger next to Content; use Header, Title and Description for structured content. Controlled open and onOpenChange let a successful form action dismiss the panel.
Composition
Content creates its own Portal and Positioner and defaults to bottom/center with sideOffset 4. Anchor, collision and keepMounted props are forwarded. Scalar content uses painted wrapping; structured controls remain your own children.
Interaction and limits
Base UI owns outside dismissal, keyboard focus and restoration. Preserve accessible names for any input you put inside. Popup surfaces and declared title/body cases have native references; anchoring, forms and collision placement are web adaptations.
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 { Popover as Primitive } from "@base-ui/react/popover";
import * as React from "react";
import { Button } from "./button";
import { minecraftCardSprite } from "./minecraft-card-sprite";
import { CardScaleContext } from "./minecraft-card-text";
import {
PopoverTextContext,
MinecraftPopoverText,
} from "./minecraft-popover-text";