Examples
Default
Large (600px)
With Header Description
Simple Default
With Trigger
Props
Dialog
Root component that manages open/close state for a dialog. A direct re-export of the RadixDialogPrimitive.Root primitive. It accepts all of that primitive’s props, unchanged.
DialogBody
Scrollable content area (slot) between the header and footer. Grows to fill available space and scrolls when content overflows. Takes no props of its own. Accepts all standarddiv attributes, including className.
DialogClose
Convenience alias for RadixDialog.Close. Closes the dialog when clicked.
A direct re-export of the Radix DialogPrimitive.Close primitive. It accepts all of that primitive’s props, unchanged.
DialogContent
The dialog panel. Includes the overlay by default and portals todocument.body by default.
Set portal={false} to keep overlay and content in the DOM subtree of the parent Dialog. fixed positioning still applies; ancestors with transform or overflow may affect layout.
On mobile viewports (<640px), the dialog slides up from the bottom as a sheet with top-only border radius by default; pass mobilePresentation="card" to render a centered floating card instead (used for small confirmation dialogs). On larger viewports it renders centered with full border radius.
boolean
"sheet" | "card"
default:"sheet"
How the dialog presents below the
sm breakpoint."sheet"— bottom sheet pinned to the viewport bottom edge (default)"card"— centered floating card per the v2-modal confirmation spec: 16px side margins, 24px padding, 32px radius on all corners, no pull handle
boolean
default:"true"
When true, renders overlay automatically.
DialogOverlayProps
Props forwarded to the default
DialogOverlay when overlay is true.boolean
default:"true"
When true, teleports overlay and panel to
document.body. When false, renders inline in the React tree (useful inside theme providers or scoped containers).boolean
default:"true"
Show the v2 mobile sheet pull handle. Only rendered when
mobilePresentation is "sheet"."md" | "sm" | "lg"
default:"md"
Width preset for the dialog.
"sm"— 400px max-width (confirmations, simple forms)"md"— 440px max-width (default, standard dialogs)"lg"— 600px max-width (complex content, tables)
DialogDescription
Accessible description for the dialog. Rendered as secondary text.boolean
DialogFooter
Footer bar for the dialog. Typically contains action buttons. Children are laid out in a horizontal row with equal flex-basis. Takes no props of its own. Accepts all standarddiv attributes, including className.
DialogHeader
Header bar for the dialog. Renders the title with an optional back arrow and close button.string
default:"Go back"
Accessible label for the back button.
string
default:"Close"
Accessible label for the close button.
(() => void)
Called when the back button is clicked.
boolean
Show a back arrow button on the left side. Defaults to
true when onBack is provided.boolean
default:"true"
Show the close (X) button in the header.
DialogOverlay
Semi-transparent backdrop rendered behind the dialog content. Rendered byDialogContent; portaled to document.body when DialogContent portal is true.
boolean
DialogTitle
Accessible title for the dialog. Must be rendered insideDialogHeader or directly within DialogContent.
boolean
DialogTrigger
The element that opens the dialog when clicked. On touch / pen, a press-and-release that crosses a small movement threshold is treated as a drag and the resulting synthetic click is suppressed — defends against Android Chrome opening the dialog on a scroll-drag-end. Accepts all props of the underlying RadixDialogPrimitive.Trigger primitive, plus className.
Exported types
Also exported from@fanvue/ui: DialogBodyProps, DialogCloseProps, DialogContentProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogOverlayProps, DialogProps, DialogTitleProps, DialogTriggerProps.
Setup: Installation · Theming