jatui

Drawer

Sliding panel overlay with position, size, and escape-key dismiss

Demo

Props

PropTypeDefaultDescription
openbooleanfalseControls visibility
titlestring-Drawer header title
position"left" | "right""right"Slide-in direction
size"sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full""md"Panel width
widthstring-Arbitrary Tailwind width class (e.g. "w-[42rem]"); takes precedence over size
headerActionsSnippet-Rendered in the header, left of the close button
footerSnippet-Pinned below the scrollable body — action rows / submit buttons that stay visible while content scrolls
trapKeysbooleantrueBlock window-level keyboard events while open
onclose() => void-Close callback