Sheet

Enhances the Dialog component to display supporting content for the main interface.

@radix-ui/react-dialog

@lucide/react

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes-storev2.vercel.app/r/sheet.json

Examples


Side

Specify the side property on <SheetContent /> to control from which edge of the screen the sheet slides in. Accepted values are top, right, bottom, or left.

Trigger Variation

Use the <SheetTrigger /> component to define how the sheet is opened. It can wrap various elements such as buttons, icons, links, or even custom components, providing flexibility in user interactions.

Nested Sheet

You can open a sheet from within another sheet to handle multi-step workflows or drill-down navigation. This pattern is great for flows like nested settings, detail editing, or multi-step forms.


API Reference

Sheet

PropTypeDefault
openboolean-
onOpenChange(open: boolean) => void-

SheetTrigger

PropTypeDefault
asChildbooleanfalse

SheetContent

PropTypeDefault
sidetop,right,bottom,leftright
children(open: boolean) => void-

SheetClose

PropTypeDefault
asChildbooleanfalse