Sheet

A React sheet that slides in from any edge as a side panel for filters, carts, and mobile navigation, with a persistent mode that ignores backdrop clicks.

Loading preview

Examples

Practical examples and common states for the same installable component.

Left

Navigation rails and file-tree panels.

examples/sheet-left.tsx
import { Sheet, SheetContent, SheetTrigger } from "@/components/wensity/sheet";
export function LeftSheet() {
return (
<Sheet>
<SheetTrigger>Menu</SheetTrigger>
<SheetContent side="left" />
</Sheet>
);
}

Right

Inspector and detail panels anchored to the right edge.

examples/sheet-right.tsx
import { Sheet, SheetContent, SheetTrigger } from "@/components/wensity/sheet";
export function RightSheet() {
return (
<Sheet>
<SheetTrigger>Inspect</SheetTrigger>
<SheetContent side="right" />
</Sheet>
);
}

Top

Announcements and compact top banners.

examples/sheet-top.tsx
import { Sheet, SheetContent, SheetTrigger } from "@/components/wensity/sheet";
export function TopSheet() {
return (
<Sheet>
<SheetTrigger>What's new</SheetTrigger>
<SheetContent side="top" />
</Sheet>
);
}

Bottom

Mobile action sheets from the bottom edge.

examples/sheet-bottom.tsx
import { Sheet, SheetContent, SheetTrigger } from "@/components/wensity/sheet";
export function BottomSheet() {
return (
<Sheet>
<SheetTrigger>Actions</SheetTrigger>
<SheetContent side="bottom" />
</Sheet>
);
}

Persistent

Ignores overlay clicks - requires explicit dismiss.

examples/sheet-persistent.tsx
import { Sheet, SheetContent, SheetTrigger } from "@/components/wensity/sheet";
export function PersistentSheet() {
return (
<Sheet>
<SheetTrigger>Pin panel</SheetTrigger>
<SheetContent side="right" persistent />
</Sheet>
);
}

Overview

Sheet is a React and Tailwind CSS side panel built on Base UI Dialog, in Next.js or any React app, that slides in from the left, right, top, or bottom edge. It behaves like a modal, holding focus and closing on Escape, which suits filters, settings, carts, and mobile navigation. persistent stops clicks on the backdrop from closing it, for inspectors where a stray click would lose work. SheetHeader, SheetBody, and SheetFooter lay out the content, and a hidden title is added when you leave SheetTitle out. For a panel users drag down to close, use Drawer instead.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add sheet

Usage

Import Sheet from @/components/wensity/sheet and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
import {
Sheet,
SheetContent,
SheetHeader,
SheetTitle,
SheetTrigger,
} from "@/components/wensity/sheet";
export function SheetDemo() {
return (
<Sheet>
<SheetTrigger>Open</SheetTrigger>
<SheetContent side="right">
<SheetHeader>
<SheetTitle>Filters</SheetTitle>
</SheetHeader>
</SheetContent>
</Sheet>
);
}

Props

PropTypeDefaultDescription
openboolean-Controlled open state.
defaultOpenboolean-Initial open state when uncontrolled.
onOpenChange(open: boolean) => void-Called when the sheet opens or closes.
modalbooleantrueTraps focus and blocks interaction with the page behind.
persistentbooleanfalsePrevents an outside click from dismissing the sheet.
  • Genie Effect component preview

    Genie Effect

    A macOS genie minimize built on a real per-slice warp that sucks any window, folder, or panel down into a waiting dock.

  • Peel Effect component preview

    Peel Effect

    Grab any corner and peel the sheet back. It curls, catches the light, and springs shut with the weight of paper.

  • Refraction Glass Container component preview

    Refraction Glass Container

    Real refraction, where feDisplacementMap warps the actual pixels sitting behind the card instead of blurring them.

  • Tinder-Style Swipe Cards component preview

    Tinder-Style Swipe Cards

    Tinder-style swipe cards where the top card flicks off under your thumb and the one underneath rises in real time.