Skip to content

Sheets

Sheet is a modal panel that slides in from an edge of the screen over a scrim. It defaults to the right edge but can anchor to any side. Reach for it when you need more room than a popover but want to keep the user in context: filters, detail views, and side forms all fit well.

Live demo

The interactive story below runs from the deployed Storybook.

Usage

Source: sheet.tsx

import {
Sheet,
SheetTrigger,
SheetContent,
SheetHeader,
SheetTitle,
SheetDescription,
SheetFooter,
SheetClose,
Button,
} from "@beacon/design-system";
<Sheet>
<SheetTrigger asChild>
<Button variant="outline">Open Sheet</Button>
</SheetTrigger>
<SheetContent side="right">
<SheetHeader>
<SheetTitle>Edit profile</SheetTitle>
<SheetDescription>
Make changes to your profile here. Click save when you're done.
</SheetDescription>
</SheetHeader>
<SheetFooter>
<SheetClose asChild>
<Button type="submit">Save changes</Button>
</SheetClose>
</SheetFooter>
</SheetContent>
</Sheet>

Parts

PartRole
SheetRoot state container. Accepts open and onOpenChange for controlled use.
SheetTriggerElement that opens the sheet. Use asChild to wrap your own button.
SheetContentThe sliding panel. Takes a side prop and renders a built-in close button.
SheetHeaderLayout wrapper for the title and description.
SheetTitleAccessible heading announced to screen readers.
SheetDescriptionSupporting text under the title.
SheetFooterAction row, right-aligned on larger screens.
SheetCloseDismisses the sheet. Use asChild to make a custom element close it.
SheetPortalRenders content into a portal at the document root.
SheetOverlayThe backdrop scrim. Included automatically by SheetContent.

side values

ValueEdge
rightSlides in from the right (default).
leftSlides in from the left.
topSlides down from the top.
bottomSlides up from the bottom.

When to use

  • Filter panels, detail views, and side forms that need more width than a popover.
  • Secondary tasks where the user should keep sight of where they came from.
  • A bottom-anchored mobile-style choice list (see Action Sheets, which uses this same component with side="bottom").

Do not use a Sheet for a focused, page-blocking task that belongs dead center: use a Dialog instead.