Shadcn Sheet
React sheet for settings, filters, and side panels. Built with TypeScript and Tailwind CSS for Next.js using Base UI — slides from any edge with a focus trap.
A sheet is a dialog that slides in from an edge. Use it for settings, filters, a cart, or a mobile nav — work that sits next to the page instead of covering it. If they only pick yes or no, that is an Alert Dialog.
Looking for a neobrutalism version for shadcn?
Same sheet, thicker borders. The NeoBrutalism sheet is the kit if you want that look.
Usage
import {
Sheet,
SheetClose,
SheetContent,
SheetDescription,
SheetFooter,
SheetHeader,
SheetTitle,
SheetTrigger,
} from "@/components/ui/sheet"<Sheet>
<SheetTrigger>Open</SheetTrigger>
<SheetContent>
<SheetHeader>
<SheetTitle>Edit profile</SheetTitle>
<SheetDescription>This action cannot be undone.</SheetDescription>
</SheetHeader>
</SheetContent>
</Sheet>Put render={<Button />} on the trigger so the Button is the actual control. side on SheetContent is top, right, bottom, or left — default is right. SheetTitle is required.
Composition
Side
side on SheetContent — top, right, bottom, or left. Right is settings. Left is nav.
No Close Button
showCloseButton={false} hides the top-right X. Overlay click and Escape still dismiss it.
RTL
Wrap with DirectionProvider and dir="rtl". The panel slides from the start edge — side="left".
API
Prop
Type
SheetContent
Prop
Type
SheetTrigger and SheetClose take render.
Keyboard
| Key | Action |
|---|---|
Space / Enter | Open from the trigger, or fire the focused button |
Escape | Close and return focus to the trigger |
Tab / Shift + Tab | Cycle controls inside the sheet |
Focus stays in the overlay until it closes. Title and description are announced.
Notes
Hiding the X is not a lock
showCloseButton={false} still dismisses on overlay click and Escape. Prevent those events if they have to finish the form.
Name the action on the footer button. After it succeeds, a Sonner toast is enough.
With other components
Trigger and footer actions
FormFields inside the panel
FieldLabel stacked with input
InputName, username
LabelVisible or screen-reader only
Scroll AreaLong lists inside
Questions
Related
Was this page helpful?
Sign in to leave feedback.
Separator
React separator for menus, forms, and list rows. Built with TypeScript and Tailwind CSS for Next.js using Base UI — horizontal or vertical, decorative by default.
Sidebar
React sidebar for app shells and dashboard navigation. Built with TypeScript and Tailwind CSS for Next.js using Base UI — collapsible rail, mobile sheet, Cmd+B.