grasscnGitHub

Sheet

An edge panel composed with Minecraft popup artwork.

Preview

Loading example...
To run this copied example, install these items using the linked CLI or manual instructions:

Usage

Sheet uses Base UI Dialog and supplies scale 2. Content defaults to the right edge and also supports left, top and bottom. This example supplies a visibly labelled Done action and disables the automatic close button.

Composition

Content owns Portal, Overlay and its card context. Header contains Title and Description; Footer contains SheetClose. Set showCloseButton={false} when providing your own labelled footer close: the current automatic Close has no children.

Interaction and limits

Preserve Title and an accessible close action for modal keyboard users. Sheet placement and motion are web adaptations; the card and label constituents have native references, but no vanilla Minecraft edge-sheet widget is claimed.

See the upstream API for the underlying part and event contracts.

Installation

Loading registry address

Component source

This is the component implementation. Its supporting styles, helpers and resources are also required. See complete manual installation.

Component implementationcomponents/ui/sheet.tsx · tsx
"use client";

import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
import * as React from "react";

import { Button } from "./button";
import { minecraftCardSprite } from "./minecraft-card-sprite";
import { CardScaleContext } from "./minecraft-card-text";
import { MinecraftDialogBackdrop } from "./minecraft-dialog-backdrop";
import {
  MinecraftDisclosureText,
  MinecraftDisclosureHeading,

Interactive playground