React Drawer

The detail-on-the-side pattern every data table needs: click a row, inspect the record, act — without losing your place. Slides from the right (or left/bottom), with a title + mono description header, a scrollable body, and a pinned footer for actions. Escape and scrim click close it; body scroll locks while open.

Slides from the right; Escape or scrim click closes.

Installation

npx shadcn@latest add drawer.json

Usage

Loading...

Props

PropTypeDefaultDescription
openbooleanControlled visibility
onClose() => voidEscape / scrim / close button
titlestringHeader title + accessible name
descriptionstringMono line under the title
side'right' \'left' \'bottom'
size'sm' \'md' \'lg'
footerReact.ReactNodePinned action bar