Side Sheet

A customizable sheet component for creating elegant slide-out interfaces.

Installation

npx shadcn@latest add https://scrollxui.dev/registry/side-sheet.json 

Usage

import {
  SideSheet,
  SideSheetTrigger,
  SideSheetContent,
  SideSheetHeader,
  SideSheetTitle,
  SideSheetDescription,
  SideSheetFooter,
  SideSheetClose,
} from "@/components/ui/side-sheet";
<SideSheet side="right"> // or left
  <SideSheetTrigger asChild>
    <Button>Open Sheet</Button>
  </SideSheetTrigger>
  <SideSheetContent>
    <SideSheetHeader>
      <SideSheetTitle>Title</SideSheetTitle>
      <SideSheetDescription>Description</SideSheetDescription>
    </SideSheetHeader>
    content..
    <SideSheetFooter>
      <SideSheetClose asChild>
        <Button>Close</Button>
      </SideSheetClose>
    </SideSheetFooter>
  </SideSheetContent>
</SideSheet>

Examples


Right side

API Reference

Side Sheet

A customizable sheet component for creating elegant slide-out interfaces.

Props

PropertyTypeDefaultDescription
openbooleanundefined
Controlled open state. If provided, SideSheet becomes controlled.
defaultOpenbooleanfalse
Initial open state (uncontrolled). Used when `open` is not controlled.
onOpenChange(open: boolean) => voidundefined
Callback fired when the open state changes. Works for controlled and uncontrolled usage.
side"left" | "right""right"
Which side the sheet slides in from.
widthstring"400px"
Width of the sheet. Accepts `px`, `%`, `vw` values. Adjusts responsively on smaller screens.
closeThresholdnumber0.3
Drag threshold (fraction of width) at which the sheet will close when swiped.
classNamestring-
Additional classNames applied to the SideSheet container.
childrenReactNoderequired
Content of the SideSheet. Usually composed of compound components like `SideSheetHeader`, `SideSheetContent`, `SideSheetFooter`.

Built withby Ahdeetai.