Sheet
ProNewA panel that slides in from any edge with a fixed header and footer. The bottom sheet follows the finger and closes on a drag or a flick.
Installation
pnpm dlx shadcn@latest add @viewport/sheet
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| title* | stringThe heading of the panel. It also names the dialog for screen readers. | — |
| description | string | — |
| side | keyof typeof sidesThe edge the panel slides in from. `bottom` can be dragged down by its handle to close. | "right" |
| footer | React.ReactNodeActions pinned to the bottom of the panel, outside the scrolling area. | — |
Accessibility
- Built on Radix Dialog: focus trap, focus restore, Escape to close.
- The title names the dialog; the description is wired when present.
- Dragging is an addition: the close button and Escape always work.
- Appears without sliding under reduced motion.
- Respects the safe-area inset on phones.