---
title: Sheet
description: A flyout that opens from the side of the screen, based on the dialog component.
links:
doc: https://base-ui.com/react/components/dialog#api-reference
---
## Installation
CLIManual
```bash
npx shadcn@latest add @coss/sheet
```
Install the following dependencies:
```bash
npm install @base-ui/react
```
Copy and paste the following code into your project.Update the import paths to match your project setup.
## Usage
```tsx
import {
Sheet,
SheetContent,
SheetDescription,
SheetFooter,
SheetHeader,
SheetPanel,
SheetPopup,
SheetTitle,
SheetTrigger,
} from "@/components/ui/sheet"
```
```tsx
OpenAre you absolutely sure?
This action cannot be undone. This will permanently delete your account
and remove your data from our servers.
ContentClose
```
## API Reference
### Sheet
Root component. Alias for `Dialog.Root` from Base UI.
### SheetTrigger
Trigger button that opens the sheet. Alias for `Dialog.Trigger` from Base UI.
### SheetPopup
Popup container that displays the sheet content. Also exported as `SheetContent`.
| Prop | Type | Default | Description |
| ----------------- | ----------------------------------------- | ----------- | ------------------------------------------------ |
| `side` | `"right" \| "left" \| "top" \| "bottom"` | `"right"` | Controls which side of the screen the sheet opens from |
| `variant` | `"default" \| "inset"` | `"default"` | Controls the sheet style. `inset` adds spacing around the sheet on desktop screens |
| `showCloseButton` | `boolean` | `true` | When true, displays a close button in the top-right corner |
| `closeProps` | `Dialog.Close.Props` | - | Props forwarded to the internal close button, useful for overriding `aria-label` |
| `portalProps` | `Dialog.Portal.Props` | - | Props forwarded to the internal portal (`keepMounted`, `container`, etc.); see Base UI Dialog portal API |
**Example:**
```tsx
// Right side sheet (default)
...
// Left side sheet
...
// Top sheet
...
// Bottom sheet
...
// Sheet with inset variant
...
```
### SheetHeader
Container for the sheet title and description. Supports the `render` prop for polymorphic composition (e.g. `render={}`).
### SheetFooter
Footer section for action buttons. Supports the `render` prop for polymorphic composition.
| Prop | Type | Default | Description |
| ----------- | ------------------------ | ----------- | ------------------------------------------------ |
| `variant` | `"default" \| "bare"` | `"default"` | Controls the footer styling. `default` includes border and background, `bare` removes them |
### SheetTitle
Title component. Alias for `Dialog.Title` from Base UI.
### SheetDescription
Description component. Alias for `Dialog.Description` from Base UI.
### SheetPanel
Scrollable content container. Automatically wraps content in a `ScrollArea` component. Supports the `render` prop for polymorphic composition.
| Prop | Type | Default | Description |
| ------------ | --------- | ------- | ------------------------------------------------ |
| `scrollFade` | `boolean` | `true` | When true, shows a fade effect at scroll edges |
**Example:**
```tsx
{/* Long content that will scroll if it exceeds the sheet height */}
...
```
### SheetClose
Close button component. Alias for `Dialog.Close` from Base UI.
### SheetPortal
Portal component for rendering outside the DOM hierarchy. Alias for `Dialog.Portal` from Base UI.
### SheetBackdrop
Backdrop/overlay component. Also exported as `SheetOverlay`. Alias for `Dialog.Backdrop` from Base UI.
## Examples
### Sheet with Inset
### Side sheets