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. UnlessclassName sets horizontal padding, its clip edge sits 4px outside the content so rings on edge controls show.
Takes no props of its own. Accepts all standard div 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 floating card anchored near the bottom instead (used for small confirmation dialogs). On larger viewports it renders centered with full border radius. size="full" skips both and fills the viewport with no chrome. Give a multi-step dialog a step to animate between its views (see MorphPanel). The panel carries its size as data-size, for styling its children.
It animates in and out. While the closing animation plays the panel stays mounted but ignores pointer input, so a second click can’t act on it.
How the dialog presents below the
sm breakpoint."sheet"— bottom sheet pinned to the viewport bottom edge (default)"card"— floating card per the v2-modal spec: 8px from the sides and the bottom (plus the safe-area inset), 16px padding, 32px radius on all corners, no pull handle
When true, teleports overlay and panel to
document.body. When false, renders inline in the React tree (useful inside theme providers or scoped containers).Show the v2 mobile sheet pull handle. Only rendered when
mobilePresentation is "sheet".Size 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)"full"— edge to edge with no border, radius, padding or pull handle, on the theme’sbg-background-primarysurface, for media viewers. A viewer that wants a black stage passes its own surface throughclassName. Its height follows--visual-viewport-hwhen the page sets it (to track the on-screen keyboard) and falls back to100dvh.
Which view of a multi-step dialog is showing, in navigation order: a higher step is deeper. When set, the children sit in a
MorphPanel, so changing it morphs the dialog to the new view’s height and slides the view in from the right going deeper or from the left going back. Children keep their state across steps, and focus moves to the new view’s heading. Leave it unset for a dialog with one view.Keep it a number for as long as the dialog is open: switching between a number and undefined adds or removes the panel and remounts the children. Reset it after the close animation rather than in onOpenChange(false), or the dialog plays a step transition as it closes.DialogDescription
Accessible description for the dialog. Rendered as secondary text.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. In a dialog with astep, it holds still while the body moves between steps (see MorphPanel).
Description rendered full width below the title, under the back and close buttons. Use it instead of a
DialogDescription child, not with one: a dialog takes one description. It wraps inside the header element, so className, ref and other props cover it too. With graphic, it renders centred below the title instead.Illustration shown centred in an 80px slot above the title. When set, the header centres the title and description, and the back and close buttons sit in a row above the illustration. Use it for dialogs led by an illustration; leave it unset when the body is the visual, such as a list or a QR code. Hide a decorative graphic from screen readers (
aria-hidden or alt=""); give a meaningful one a name. In a dialog with a step, a header with a graphic moves with the body between steps rather than holding still.DialogOverlay
Semi-transparent backdrop rendered behind the dialog content. Rendered byDialogContent; portaled to document.body when DialogContent portal is true.
DialogTitle
Accessible title for the dialog. Must be rendered insideDialogHeader or directly within DialogContent.
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.Exported types
Also exported from@fanvue/ui: DialogBodyProps, DialogCloseProps, DialogContentProps, DialogContentSize, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogOverlayProps, DialogProps, DialogTitleProps, DialogTriggerProps.
Setup: Installation · Theming