Murasaki
Components

Sheet

Extends the Dialog component to display content that complements the main content of the screen.

Usage

import {
  Sheet,
  SheetContent,
  SheetDescription,
  SheetHeader,
  SheetTitle,
  SheetTrigger,
} from "@murasakijs/ui";
<Sheet>
  <SheetTrigger>Open</SheetTrigger>
  <SheetContent side="right">
    <SheetHeader>
      <SheetTitle>Title</SheetTitle>
      <SheetDescription>Description</SheetDescription>
    </SheetHeader>
  </SheetContent>
</Sheet>

Variants

SheetContent's side prop controls which edge of the screen it slides in from.

API Reference

SheetContent

PropTypeDefault
side"top" | "bottom" | "left" | "right""right"

Other subcomponents

ComponentDescription
SheetThe root primitive (same API as Dialog).
SheetTriggerThe element that opens the sheet. Supports asChild.
SheetHeaderVertical stack for SheetTitle / SheetDescription.
SheetFooterA row for actions, right-aligned on larger screens.
SheetTitleThe sheet's accessible name.
SheetDescriptionThe sheet's accessible description.
SheetCloseA button that closes the sheet. Supports asChild.

Sheet uses the same React Aria modal and dialog behavior as Dialog, styled to slide in from an edge of the viewport instead of appearing centered.

Improve this page on GitHub

On this page