Ballmac UI home

Sheet

A modal panel that slides from any edge, with header, scrollable body and footer parts, a grab handle on bottom sheets, and safe-area padding.

Acme launch

Project settings

Installation

$ pnpm dlx shadcn@latest add @ballmac/sheet

Usage

import { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetBody, SheetFooter, SheetTitle, SheetDescription } from "@/components/ballmac/sheet"

The full example is in the Code tab above.

Examples

Four edges

API reference

PropTypeDefault
side

Edge the sheet slides in from. `end` (the default) and `start` follow the reading direction; `right` and `left` are fixed.

"top" | "end" | "bottom" | "start" | "right" | "left""end"
showCloseButton

Show the close control in the corner.

booleantrue
closeLabel

Accessible name for the close control.

string—
side"end" | "start" | "right" | "left" | "top" | "bottom""end"

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Enter / SpaceOpens from the trigger
Tab / Shift+TabCycles focus inside the sheet
EscapeCloses and returns focus to the trigger

Use with AI

A dialog attached to a screen edge. Use side right for settings panels, bottom for mobile actions, left for navigation. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Sheet (@ballmac/sheet) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Edit forms that keep page context visible
  • Filters and settings panels
  • Mobile navigation drawers

Not for

  • Short confirmations; use alert-dialog
  • Small anchored panels; use popover

Registry JSON: https://ui.ballmac.com/r/sheet.json

Credits

Based on shadcn/ui Sheet, adapted by Ballmac. Free to use in personal and commercial projects.