Prodular UI

Overlays

Sheet

A panel that slides in from an edge of the screen for editing or inspecting a record without leaving the page.

npx prodular-ui add sheet

Edit a record

Header and footer stay fixed, SheetBody scrolls.

Sides

Floating

variant floating insets the sheet from the edges with rounded corners. Good for detail peeks.

Anatomy

<Sheet>  <SheetTrigger render={<Button variant="outline" />}>Edit customer</SheetTrigger>  <SheetContent side="right">    <SheetHeader>      <SheetTitle>Northgate Logistics</SheetTitle>      <SheetDescription>Changes sync to the CRM.</SheetDescription>    </SheetHeader>    <SheetBody>{/* fields */}</SheetBody>    <SheetFooter>      <SheetClose render={<Button variant="outline" />}>Cancel</SheetClose>      <Button>Save changes</Button>    </SheetFooter>  </SheetContent></Sheet>

Guidance

Use it when

  • Use right side sheets to edit or inspect one record from a list, so the list stays in context.
  • Use bottom sheets on small screens for short pickers. Consider Drawer when swipe to dismiss matters.
  • Use the floating variant for quick, read mostly peeks.

Avoid

  • Short confirmations. Use Alert dialog.
  • Very wide content such as tables with many columns. Use a page.
  • Stacking a sheet on top of a dialog.

Rules for AI agents

Published in llms-full.txt and the registry, so coding agents follow them when they build with this component.

  • Always render SheetTitle inside SheetHeader. Use className="sr-only" if it must be hidden.
  • Compose as SheetHeader, SheetBody, SheetFooter. Only SheetBody scrolls.
  • Use side="right" by default. Use left only for navigation.
  • Put Cancel as SheetClose render={<Button variant="outline" />} before the primary action in SheetFooter.
  • Override width with a max-w class on SheetContent (for example sm:max-w-lg), never with a pixel width.

API

SheetContent

PropTypeDefaultDescription
side"top" | "right" | "bottom" | "left""right"Edge the sheet slides in from.
variant"default" | "floating""default"floating adds a margin, a full border and rounded corners.
showCloseButtonbooleantrueRenders the icon close button.