Application
Sheet
An edge panel with a scrollable body for details, forms, and filters.
MotionSlides in and out with spring.soft and respects reduced motion.
Install
Install Kineto and follow the theme setup once in your app.
bash
npm install kinetotsx
import {
SheetBody,
Sheet,
SheetClose,
SheetContent,
SheetDescription,
SheetFooter,
SheetHeader,
SheetTitle,
SheetTrigger,
} from "kineto/sheet";Preview
tsx
"use client";
import type { HTMLAttributes } from "react";
import {
Drawer as Sheet,
DrawerClose as SheetClose,
DrawerContent as SheetContent,
DrawerDescription as SheetDescription,
DrawerFooter as SheetFooter,
DrawerHeader as SheetHeader,
DrawerTitle as SheetTitle,
DrawerTrigger as SheetTrigger,
type DrawerContentProps as SheetContentProps,
} from "@/components/ui/drawer";
import { cn } from "@/lib/cn";
export function SheetBody({ className, ...props }: HTMLAttributes<HTMLDivElement>) {
return <div className={cn("min-h-0 flex-1 overflow-y-auto", className)} {...props} />;
}
export {
Sheet,
SheetClose,
SheetContent,
SheetDescription,
SheetFooter,
SheetHeader,
SheetTitle,
SheetTrigger,
type SheetContentProps,
};src/components/ui/sheet.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| SheetContent side | "right" | "left" | "top" | "bottom" | "right" | Edge the panel opens from. |
| SheetBody | component | — | Scrollable region between the header and footer. |
| open | boolean | — | Controlled open state. |
| onOpenChange | (open: boolean) => void | — | Receives changes to the open state. |