--- title: Sheet description: Extends the Dialog component to display content that complements the main content of the screen. component: true links: doc: https://www.radix-ui.com/docs/primitives/components/dialog api: https://www.radix-ui.com/docs/primitives/components/dialog#api-reference source: radix: true shadcn: true --- 1. **Use for side panels** - Forms with multiple fields - Settings panels - Detailed editors 2. **Consider screen size** - Sheets work well on desktop - On mobile, consider full-screen or bottom sheet variants 3. **Structure content clearly** - Use `SheetHeader` and `SheetTitle` for context - Use `SheetSection` to group related fields - Use `SheetFooter` for actions ## Installation CLI Manual ```bash npx shadcn-ui@latest add sheet ``` Install the following dependencies: ```bash npm install @radix-ui/react-dialog ``` Copy and paste the following code into your project. Update the import paths to match your project setup. ### Usage ```tsx import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger, } from '@/components/ui/sheet' ``` ```tsx Open Are you absolutely sure? This action cannot be undone. This will permanently delete your account and remove your data from our servers. ``` ## Examples ### Nonmodal This sheet is nonmodal, meaning it does not block the underlying content. It’s useful when you want to display content that complements the main content of the screen. To have the underlying content resize to fit the sheet (so nothing is overlapping) use the Sidebar component or build a custom panel. You can refer to the following Studio components for guidance: - `AIAssistant` - `EditorPanel` - `AdvisorPanel` See [`LayoutSidebarProvider`](https://github.com/supabase/supabase/blob/master/apps/studio/components/layouts/ProjectLayout/LayoutSidebar/LayoutSidebarProvider.tsx) for more. ### Size You can adjust the size of the sheet using CSS classes: ```tsx {3} Open Are you absolutely sure? This action cannot be undone. This will permanently delete your account and remove your data from our servers. ``` ### Side Use the `side` property to `` to indicate the edge of the screen where the component will appear. The values can be `top`, `right`, `bottom` or `left`. That said, stick to the default `right` unless you have a strong reason not to.