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.
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
Installation
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.
Related
- Left-Sided SheetA sheet that slides in from the left edge
- Bottom-Sliding SheetA sheet that slides up from the bottom of
- Top-Sliding SheetA sheet that slides down from the top of
- Sheet with Header, Content, and FooterA right-side sheet in three parts: a
- Contact Form SheetA right-side contact sheet with name
- Standard DialogA share dialog with a read-only link, a