Make your AI a shadcn expert

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.

Scroll to load preview...

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

SheetTrigger
SheetTitle
SheetDescription

Side

side on SheetContenttop, right, bottom, or left. Right is settings. Left is nav.

Scroll to load preview...

No Close Button

showCloseButton={false} hides the top-right X. Overlay click and Escape still dismiss it.

Scroll to load preview...

RTL

Wrap with DirectionProvider and dir="rtl". The panel slides from the start edge — side="left".

Scroll to load preview...

API

Prop

Type

SheetContent

Prop

Type

SheetTrigger and SheetClose take render.

Keyboard

KeyAction
Space / EnterOpen from the trigger, or fire the focused button
EscapeClose and return focus to the trigger
Tab / Shift + TabCycle 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

Questions

Was this page helpful?

Sign in to leave feedback.