overlayssheet
Sheet
Slide-in panel overlay from any screen edge with structured content slots.
Import#
Slot Structure#
Wrapper trigger with optional backdrop and a sliding panel with title, body, and footer slots.
Examples#
Variants#
Inset layout with custom close content or hidden close control.
Sides#
Open sheet from each side with shared shell slots.
Dismiss Control#
Prevent close on outside interaction and Escape while counting attempts.
API Reference#
Attributes#
Slot
trigger0 attributesElement users activate to open the sheet.
No attribute metadata for this slot.
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
| action | JSX.Element | — | Additional action elements to render in the header. |
| body | JSX.Element | — | Custom element to render in the scrollable body slot. |
| children | JSX.Element | — | Trigger element that opens the sheet. |
| class | ClassValue | — | Class applied to the component root or trigger element. |
| classes | SheetT.Classes | undefined | — | — |
| close | boolean | JSX.Element | true | Whether to show a close button, or a custom element to use as one. |
| defaultOpen | boolean | undefined | — | Initial open state when uncontrolled. |
| description | JSX.Element | — | Secondary description displayed below the title. |
| dismissible | boolean | undefined | — | Whether outside interaction and Escape should dismiss the shell. |
| footer | JSX.Element | — | Custom element to render in the footer slot. |
| header | JSX.Element | — | Custom element to render in the header slot. |
| id | string | undefined | — | Unique identifier used to derive the content id. |
| inset | boolean | undefined | — | — |
| onClosePrevent | (() => void) | undefined | — | Called when a dismissal attempt is blocked. |
| onOpenChange | ((open: boolean) => void) | undefined | — | Called whenever the open state changes. |
| open | boolean | undefined | — | Controlled open state. |
| overlay | boolean | undefined | — | Whether to render the overlay element. |
| ref | JSX.HTMLElementTags["span"] extends { ref?: infer Ref; } ? Ref : never | undefined | — | — |
| side | "bottom" | "top" | "right" | "left" | undefined | — | — |
| style | JSX.CSSProperties | undefined | — | — |
| styles | SheetT.Styles | undefined | — | — |
| title | JSX.Element | — | Primary title displayed in the sheet header. |
| transition | boolean | undefined | true | Whether to enable transition animations. |