Dialog
A modal dialog built on Base UI Dialog, with a fixed header, body, and footer layout.
Installation
import { Dialog } from "@o/pipeline/experimental/components/dialog";
Usage
Pass skipEntranceAnimation on Dialog.Root when opening via a keyboard shortcut, not when you click a trigger. See CommandMenu.
Implementation
Anatomy
The Dialog component is built on the Base UI Dialog component, with additional parts:
Dialog.RootDialog.Trigger: primitive button that opens the dialog, customizable through therenderprop.Dialog.PortalDialog.BackdropDialog.ViewportDialog.PopupDialog.HeaderDialog.HeaderClose
Dialog.BodyDialog.Title: obligatory, but can be set tovisuallyHiddenDialog.Description: optional, can be set tovisuallyHidden
Dialog.FooterDialog.FooterAction- can contain more than one action
Dialog.Close: primitive close action thatDialog.HeaderCloseextends, customizable through therenderprop.
Layout
Dialog’s core layout is fixed and non-customizable; the Dialog.Header, Dialog.Body, and Dialog.Footer will always render in the same order.
Dialog.Header and Dialog.Footer always render Dialog.HeaderClose and Dialog.FooterAction in the same position, regardless of additional content.