Sheet
Extends the Dialog component to display content that complements the main content of the screen.
Installation
pnpm dlx shadcn@latest add https://8bit.cnlibs.com/r/sheet.jsonUsage
import { Button } from "@/components/ui/button";
import {
Sheet,
SheetClose,
SheetContent,
SheetDescription,
SheetFooter,
SheetHeader,
SheetTitle,
SheetTrigger,
} from "@/components/ui/sheet";<Sheet>
<SheetTrigger render={<Button variant="outline">Open</Button>} />
<SheetContent>
<SheetHeader>
<SheetTitle>Edit profile</SheetTitle>
<SheetDescription>
Make changes to your profile here. Click save when you're done.
</SheetDescription>
</SheetHeader>
<SheetFooter>
<SheetClose render={<Button variant="outline">Close</Button>} />
</SheetFooter>
</SheetContent>
</Sheet>Left
Set the side prop to top, right, bottom, or left to change where the panel slides in from.