Sheet
stableA panel that slides in from any edge of the screen.
Basic usage
Examples
Edit profile
A right-side sheet with a form for updating user details.
Side panel variants
Sheet supports every side and keeps dialog behavior for focus and dismissal.
Features
- Four sides.
- Built on Dialog — focus trap + scroll lock.
Installation
bash
pnpm dlx structyl add sheetAPI Reference
Sheet.Root
Contains all sheet parts (built on Dialog).
| Prop | Type | Default |
|---|---|---|
| open | booleanControlled open state. | — |
| onOpenChange | (open: boolean) => voidCalled when open state changes. | — |
Sheet.Trigger
Opens the sheet.
| Prop | Type | Default |
|---|---|---|
| asChild | booleanMerge props onto the immediate child instead of rendering a default element. | false |
Sheet.Content
The sliding panel.
| Prop | Type | Default |
|---|---|---|
| side | 'top' | 'right' | 'bottom' | 'left'Edge the sheet slides from. | 'right' |
| className | stringAdditional Tailwind classes, merged with the component defaults. | — |