Sheet
A dialog that slides in from an edge of the screen.
Staticimport { Sheet } from 'umbra-ui'
Props
Sheet
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | `DialogTrigger` and `DialogContent`. |
defaultOpen | boolean | false | Initial open state when uncontrolled. |
modal | boolean | true | When `false`, content behind stays interactive and focus is not trapped. |
onOpenChange | ((open: boolean) => void) | — | Called when the dialog opens or closes. |
open | boolean | — | Controlled open state. |
SheetContent
| Prop | Type | Default | Description |
|---|---|---|---|
title required | ReactNode | — | Dialog title. Required: it is the dialog's accessible name. |
closeLabel | string | Close | Accessible label for the close button. |
description | ReactNode | — | Supporting text under the title, announced as the dialog's description. |
hideClose | boolean | false | Hides the corner close button (Escape and outside click still close). |
side | "left" | "right" | "top" | "bottom" | right | Edge the sheet slides in from. |
size | "sm" | "md" | "lg" | md | Maximum width. |
Usage notes
A Sheet is a Dialog pinned to an edge, so it takes the same props: title is required, and DialogFooter works inside it. side picks the edge; size sets the width of left and right sheets.
Accessibility
- Same as Dialog: focus is trapped while open and returns to the trigger, Escape and outside click close it.
- The slide-in is skipped under reduced motion.
Import
import { Sheet, SheetContent } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app