Skip to content
Eskais UI

Overlays

Drawer

UI SDK Drawer parts: a modal sheet from any edge (bottom or side), draggable, with focus trap, Escape and focus restore.

Example

Installation

npx shadcn@latest add @eskais/drawer
npm packagesclass-variance-authority@0.7.1

Usage

Import
import {  Drawer,  DrawerBackdrop,  DrawerClose,  DrawerContent,  DrawerDescription,  DrawerFooter,  DrawerHandle,  DrawerHeader,  DrawerTitle,  DrawerTrigger,  createDrawerController,} from "@/components/ui/drawer"

API reference

DrawerTrigger

Takes every prop of UI SDK DrawerTrigger except aria-label, ButtonLookProps.

DrawerHeader

Takes <div> attributes and render.

DrawerFooter

Takes <div> attributes and render.

DrawerClose

Takes every prop of UI SDK DrawerClose except aria-label, ButtonLookProps.

Other exports

DrawercreateDrawerController

Accessibility

  • A modal sheet from any edge, with the dialog's focus rules; drag to dismiss on touch.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.