bearnie

Sheet

A slide-out panel from the edge of the screen.

Installation

npx bearnie add sheet
npx bearnie add sheet

Usage

import {
Sheet,
SheetTrigger,
SheetOverlay,
SheetContent,
SheetHeader,
SheetTitle,
SheetDescription,
SheetFooter,
SheetClose
} from "@/components/ui"
<Sheet>
<SheetTrigger>Open</SheetTrigger>
<SheetOverlay />
<SheetContent>
  <SheetHeader>
    <SheetTitle>Sheet Title</SheetTitle>
    <SheetDescription>Sheet description goes here.</SheetDescription>
  </SheetHeader>
</SheetContent>
</Sheet>

Examples

Side positions

Without close button

Anatomy

  • Sheet - Root container that manages state
  • SheetTrigger - Button that opens the sheet
  • SheetOverlay - Background overlay
  • SheetContent - The sliding panel
  • SheetHeader - Header container
  • SheetTitle - Title text
  • SheetDescription - Description text
  • SheetFooter - Footer container
  • SheetClose - Button that closes the sheet

Props

SheetContent

PropTypeDefaultDescription
side”top” | “right” | “bottom” | “left""right”Edge of screen to slide from
showCloseButtonbooleantrueShow the X close button
classstring-Additional CSS classes