Sheet

Panel that slides in from any edge on Radix Dialog, for mobile navigation and side forms.

Installation

pnpm dlx shadcn@latest add @ward/sheet

Add the Ward registry to components.json once:

"registries": {
  "@ward": "https://ward.so/r/{name}.json"
}

Or install from the URL with no configuration: npx shadcn@latest add https://ward.so/r/sheet.json

Usage

import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "@/components/ui/sheet";
import { Button } from "@/components/ui/button";
<Sheet>
  <SheetTrigger asChild><Button variant="outline">Filters</Button></SheetTrigger>
  <SheetContent side="right">
    <SheetHeader>
      <SheetTitle>Filters</SheetTitle>
      <SheetDescription>Narrow the list by status or owner.</SheetDescription>
    </SheetHeader>
    <SheetFooter>
      <SheetClose asChild><Button>Apply</Button></SheetClose>
    </SheetFooter>
  </SheetContent>
</Sheet>

Props

PropTypeDefaultDescription
openboolean-Whether the sheet is open, when the parent controls it.
defaultOpenbooleanfalseWhether the sheet starts open when it is uncontrolled.
onOpenChange(open: boolean) => void-Called when the sheet opens or closes.
SheetContent side"top" | "right" | "bottom" | "left""right"Edge of the screen the sheet slides in from.
SheetContent showCloseButtonbooleantrueShow the close button in the top corner.
SheetTrigger asChildbooleanfalseUse the child element as the trigger instead of rendering a button.

Ward · Version 1.0.0 · Registry manifest