Umbra UI

Sheet

A dialog that slides in from an edge of the screen.

Staticimport { Sheet } from 'umbra-ui'

Props

Sheet

PropTypeDefaultDescription
children ReactNode—`DialogTrigger` and `DialogContent`.
defaultOpen booleanfalseInitial open state when uncontrolled.
modal booleantrueWhen `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

PropTypeDefaultDescription
title requiredReactNode—Dialog title. Required: it is the dialog's accessible name.
closeLabel stringCloseAccessible label for the close button.
description ReactNode—Supporting text under the title, announced as the dialog's description.
hideClose booleanfalseHides the corner close button (Escape and outside click still close).
side "left" | "right" | "top" | "bottom"rightEdge the sheet slides in from.
size "sm" | "md" | "lg"mdMaximum 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