Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Sheet examples · Standard

Sheet with Title and Description for React

A right-side sheet whose header holds a title and a description.

Framework
UI library

The minimum a sheet needs: SheetHeader with a SheetTitle that names the dialog and a SheetDescription that says what it's for. SheetContent leaves side unset, so the panel slides in from the right. Start here and add a body and a SheetFooter under the header.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

What do the title and description say?

SheetTitle reads Sheet Title and SheetDescription reads This is a description that provides additional context about the sheet content. Both sit in SheetHeader, and nothing else is in the panel.

Why does a sheet need a SheetTitle?

SheetTitle names the dialog for assistive tech, so every sheet renders one; hide it with sr-only when the design has no visible heading. SheetDescription is optional; it's read after the title when the sheet opens.

Which edge does this sheet use?

SheetContent leaves side unset, so the panel comes from the right. Set side to top, bottom or left to move it. The title and the focus trap work the same on every edge.

How does Open Sheet open it?

The button labeled Open Sheet is the trigger, and its text is the accessible name. The Button goes in the render prop of SheetTrigger, and the label stays its child.

How do I hide the corner close button?

Set showCloseButton to false on SheetContent. Then add a visible Close button, for example in a SheetFooter. Escape still closes the sheet.

When should I use a Sheet for this layout?

Use a Sheet when the panel should slide in from a screen edge and keep the page in view behind it. A centered confirmation is a Dialog. A panel people drag, usually up from the bottom on a phone, is a Drawer.